Semantic indexes

Unlike search-performance indexes, semantic indexes capture the semantic meaning or context of the data in a database. This is done by returning an approximation score, which indicates the similarity between a query string and the data in a database.

Two semantic indexes are available in Neo4j:

  • Full-text indexes: enables searching within the content of STRING properties and for similarity comparisons between query strings and STRING values stored in the database.

  • Vector indexes: enables similarity searches and complex analytical queries by representing nodes or properties as vectors in a multidimensional space.

Full-text and vector indexes can also be used together for hybrid search. This is useful when an application needs both lexical matches, such as exact terms, names, acronyms, or identifiers, and semantic matches from vector search. When combining results from different semantic indexes, rank each source independently rather than comparing raw score values directly. For a worked example, see Developer Guide → Hybrid full-text and vector search.

Unlike search-performance indexes, semantic indexes are not automatically used by the Cypher® planner. To use semantic indexes, they must be explicitly called with specific procedures or, for vector indexes, by using the Cypher SEARCH clause.