How does text index(not Full-text index) work?

In mysql there is no such index, and
WHERE n.name like '%William%'
is bad practice.

In neo4j, with text index, it's seems normal to run
WHERE n.name CONTAINS 'William'

But I can't find any detail about how it work.

Official reference only tell how to use.

It is mentioned here what predicates are supported by a text index: Create, show, and delete indexes - Cypher Manual

A text index support the CONTAINS predicate whereas a range index does not.

If you want to test/verify how the index is used (or not) for a given query, profile is your friend Execution plans and query tuning - Cypher Manual

I also found this interesting:

No, I am not ask how to use or what predicates are supported.

I am ask about how it implement.

For ex:
full-text index is clear said it's implement on top of Apache Lucene

But I can't find this info with text index.

The text index, is as far as I know is indexing n-gram's. I will see if I can find some more details and possibly update the docs.

Some more docs added on text index: Create, show, and delete indexes - Cypher Manual

1 Like

@hakan.lofqvist1
Thanks for update the doc.

How about space? Or some special/emoji text?
Does it remove them before doing index?
And is there any config for it?