fulltext_search
Search Neo4j fulltext indexes using Lucene query syntax to retrieve relevant nodes and relationships with properties and relevance scores for GraphRAG applications.
Instructions
Performs fulltext search on a Neo4j fulltext index using Lucene query syntax.
Lucene Syntax Supported:
Boolean: "legal AND compliance", "privacy OR security"
Wildcards: "compli*", "te?t"
Fuzzy: "complience~"
Phrases: ""exact phrase""
Automatic Sanitization (always applied):
Large lists (≥128 items) → replaced with placeholders
Large strings (≥10K chars) → truncated with suffix
Total response limited to 8000 tokens (results dropped if needed)
Property Selection:
Default (no return_properties): Returns ALL properties (sanitized)
With return_properties: Returns ONLY specified properties
Example: return_properties="pageNumber,id" → returns only these two
Check get_neo4j_schema_and_indexes for property warnings to avoid large fields
Returns node/relationship IDs, labels/types, properties (sanitized), and relevance scores.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text_query | Yes | The text query to search for. Supports Lucene query syntax (AND, OR, wildcards, fuzzy, etc.). | |
| fulltext_index | Yes | The name of the fulltext index to search. Use get_neo4j_schema_and_indexes to see available indexes. | |
| top_k | No | The number of most relevant results to return. | |
| return_properties | No | Optional: Comma-separated list of properties to return (e.g., "pageNumber,id"). If not specified, returns all properties with automatic sanitization (large values are truncated). |