Constructors
constructor
-
Parameters
-
Default value fieldOptions: FieldOptions[] = []
-
Optional id: string
Methods
addDocument
- addDocument(doc: object, id?: InvertedIndex.DocumentIndex): void
-
Parameters
-
doc: object
-
Default value id: InvertedIndex.DocumentIndex = doc[this._id]
Returns void
removeDocument
- removeDocument(doc: object, id?: InvertedIndex.DocumentIndex): void
-
Parameters
-
doc: object
-
Default value id: InvertedIndex.DocumentIndex = doc[this._id]
Returns void
search
- search(query: Query): Scorer.ScoreResults
-
Parameters
Returns Scorer.ScoreResults
updateDocument
- updateDocument(doc: object, id?: InvertedIndex.DocumentIndex): void
-
Parameters
-
doc: object
-
Default value id: InvertedIndex.DocumentIndex = doc[this._id]
Returns void
Initialize the full-text search for the given fields.