How are spatial and text indexes different from range index?

I read section on creating indexes and tutorial on graph academy about indexing. Also I checked operations manual. Maybe I'm missing something, maybe it's not important in some cases, but I want to know how different really are index types in new Neo4j.

All I could find was:

  1. Point index is used for spatial values
  2. Text index is used with CONTAINS and ENDS WITH operators
  3. Full text index is used for more complex text search
  4. Range index - always except in previous cases

Few years ago BTree was used for all cases except Full text. Where can I find more information on how indexes are implemented? Are they all some implementations of b-trees but using different types for key (I know that for Range index, but I can't find same information for Point and Text I can just assume from comments in changelog)? Are they implemented like hash index (probably not)?

I'm asking this because when there is some significant change it is mentioned in documentation

Point indexes have supported index configuration, see the last examples, but only one index provider available, point-1.0

Similar for Range, Text, and also for Btree when there was option in 4.3 version and before to choose provider. But if I'm not able to know anything about implementation why is provider version important? If this is really important I would like to know where I could read further about this.

Thank you for your time.

Hello @laza14.08.1998 ,

Welcome to the Neo4j Community.

Here is what engineering has to say about indexes:

RANGE and POINT indexes are both backed by a b-tree. The difference there being that range index handles all types of values whereas point indexes only indexes Point values and can be used to answer spatial queries.
TEXT index is backed by lucene and only indexes string values.
A user should almost never have to care about what index provider to choose, the default one is a good choice. The index provider had more purpose before 5.0 when we still had the BTREE index that had two different index providers deciding how it was implemented. Right now the only index type with more that one index provider version is the TEXT index where an improved version of the text provider was introduced in 5.1 (text-2.0), but it is the same thing there that the improved version is the default and the user should not have to think about it.

1 Like