Fulltext indices
The intent fulltext makes the words of a string searchable.
| Database | Index |
|---|---|
| Neo4j | full-text index (Neo4j 5.0 or newer, older versions fail the migration step), for properties stored in Neo4j |
| MongoDB | the text index of the collection, ens_<type>_fulltext_<hash>, for properties stored in MongoDB and nested properties |
| Elasticsearch | text field, with a keyword sub-field if exact is requested as well |
{ "type": "string", "index": "fulltext"}A string which is looked up by exact value and searched as text has "index": ["exact", "fulltext"].
The full-text index of Neo4j splits strings into words with an analyzer (Lucene’s standard-no-stop-words by default) and is queried with the procedures db.index.fulltext.queryNodes() and db.index.fulltext.queryRelationships(), not with MATCH ... WHERE. Neo4j also has a text index, which serves =, STARTS WITH, ENDS WITH and CONTAINS on the whole string, but finds no words; it is not used for fulltext and is available as a raw Neo4j ({"type": "text"}).
Elasticsearch needs no intent: it is the search engine of the API, so it maps every string like its dynamic mapping does, as a text field with a keyword sub-field, and both full text and exact searches work without a definition. fulltext and exact for elasticsearch only narrow this mapping, see nested properties and the . The keyword field ignores values of more than 256 characters, so long strings can only be found by their words, see the limits of .
MongoDB allows one text index per collection: it covers every property of the type which asks for fulltext in MongoDB, see nested .