Skip to main content
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

Pass a tenant property as the final argument to partition the index by tenant. Any property name works. Once the index exists, writing indexed text on a record whose tenant value is missing or 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 ten Doc nodes that best match "consensus protocol":
Hits arrive best match first, ordered by BM25 $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" becomes graph, db, v2.
  • No stemming or stopwords: running does not match run, and the is a term.
  • Query terms are deduplicated and ORed: a document matches if it contains any term. BM25 (fixed k1 1.2, b 0.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_input as a literal and invalid_query as a parameter. A query with no letters or digits, such as "---", returns no hits.
To combine keyword and semantic ranking, see Combine vector and text search.

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 into eventual 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 String or StringArray property.
  • null and 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.