addDocument method

void addDocument(
  1. String text
)

Adds text as a document to the index.

Implementation

void addDocument(String text) {
  _docs.add(text);
  _tfs.add(textToTf(text));
}