Guide
A text index provides durable BM25 full-text search over a top-level string or
string-array property on nodes or edges. Use it to rank records by exact terms and
keyword relevance.
For background, see What is full-text search?
and What is BM25?.
Full-text search and text index management are native-only: Cypher and SQL have no
syntax for them. The Cypher guide
lists what Cypher covers.
Create a text index
null fails with invalid_index_source_data. See
tenant-partitioned search indexes.
Until its build activates, searching the index fails with index_not_found.
Search an index
Search the whole index when every record of the label is a valid result. This request returns the tenDoc nodes that best match "consensus protocol":
$score descending and then by ID. Use
textSearchEdges / text_search_edges (TextSearchEdges in Go) to search an edge
index. For a tenant-partitioned index, pass the tenant value as the final argument.
$score exists only on the hit stream: a step to another element drops it, and a
projection ends the traversal. To keep it, bind the hit and read it with
projectBindings; see
Keep search scores after traversing.
How text matches
The index and the query text go through the same analyzer:- Terms are lowercased runs of Unicode letters and digits; everything else, including
punctuation and hyphens, separates them.
"Graph-DB v2"becomesgraph,db,v2. - No stemming or stopwords:
runningdoes not matchrun, andtheis a term. - Query terms are deduplicated and ORed: a document matches if it contains any term.
BM25 (fixed
k11.2,b0.75) ranks more and rarer terms higher. - No phrase, prefix, wildcard, or fuzzy queries:
"consensus protocol"matches either word, adjacent or not. - An empty query fails with
invalid_search_inputas a literal andinvalid_queryas a parameter. A query with no letters or digits, such as"---", returns no hits.
Prefilter with a traversal
To rank only the nodes or edges a traversal reaches, such as documents a user can read, search within the traversal instead of the whole index. See Prefiltered search.Search consistency
By default, searches include committed writes that the index worker has not published into the index yet. A read request can opt intoeventual search, which bounds that
work per search. See Search consistency
for both modes, searches in write batches, and index_backpressure.
Result limits
The server caps the effective result count of a whole-index search at 800. Prefiltered searches have their own limits.Indexed values
- Store searchable text in a top-level
StringorStringArrayproperty. nulland non-string values are rejected. Fix, shorten or delete them before retrying a blocked backfill; those writes are accepted while the backfill is blocked.- Keep tenant property names and values consistent with the definition.
- Keep each document within the per-document admission limits.
Writes with longer text fail, and existing longer rows block a backfill with
oversized_entity.
Next steps
Project search results
Keep ranked hit metadata while a traversal continues.
Vector indexes
Rank embeddings by semantic similarity.
Troubleshoot index operations
Resolve blocked builds and lifecycle errors.
Limits
Review analyzers, supported types, and search limits.