SearchType
Enum defining the available search modes forcognee.search().
Values
| Value | Description |
|---|---|
SearchType.SUMMARIES | Pre-generated hierarchical summaries of content. |
SearchType.CHUNKS | Raw text segments matching semantically. |
SearchType.RAG_COMPLETION | Traditional RAG: retrieve chunks, then LLM answer. |
SearchType.TRIPLET_COMPLETION | Retrieve via triplet relationships, then LLM answer. |
SearchType.GRAPH_COMPLETION | Default. Full graph context with LLM completion. (default) |
SearchType.GRAPH_SUMMARY_COMPLETION | Graph context with summary-enhanced completion. |
SearchType.CYPHER | Direct Cypher query against the graph database. |
SearchType.NATURAL_LANGUAGE | Natural language translated to Cypher. |
SearchType.GRAPH_COMPLETION_COT | Graph completion with chain-of-thought reasoning. |
SearchType.GRAPH_COMPLETION_CONTEXT_EXTENSION | Graph completion with extended context window. |
SearchType.FEELING_LUCKY | Auto-select the best search type for the query. |
SearchType.TEMPORAL | Temporal-aware search for time-sensitive queries. |
SearchType.CODING_RULES | Code-specific retrieval (coding rules, codebase search). |
SearchType.CHUNKS_LEXICAL | Token-based lexical chunk search (e.g. Jaccard similarity). |
Choosing a Search Type
I want an LLM-generated answer grounded in my data
I want an LLM-generated answer grounded in my data
Use
GRAPH_COMPLETION (default) for the best balance of accuracy and context.
Use RAG_COMPLETION for a simpler chunk-based approach.I want raw data, not an LLM answer
I want raw data, not an LLM answer
Use
CHUNKS for semantic chunk retrieval or CHUNKS_LEXICAL for keyword-based.
Use SUMMARIES for pre-generated summaries.I want to query the graph directly
I want to query the graph directly
Use
CYPHER for raw Cypher queries or NATURAL_LANGUAGE to have cognee
translate your question to Cypher.I'm not sure which to use
I'm not sure which to use
Use
FEELING_LUCKY — cognee will pick the best search type for your query.