search

abstract fun search(query: KeyValueQuery): SearchResult(source)

Starts a search on the current state, reading on the caller's thread; close the result when done. A search the index controls of CreationOptions leave unanswerable throws QueryRejectedException with QueryRejectedException.Reason.NOT_INDEXED (SPEC.md §4.6).


abstract fun search(query: JsonPathQuery): SearchResult(source)

Starts a JSONPath search on the current state (SPEC.md §10.4): the distinct nodes the query selects from every document, in the query's order of (docId, nodePre). Close the result when done.

The index narrows the documents down by the terms the query requires (explain); a query that requires none throws QueryRejectedException unless JsonPathQuery.scan allows reading every document, as does a range that matches too many documents, and a query of more than 31 segments.


Starts a search of documents in key order (SPEC.md §3.3) on the current state; close the result when done. A store without document keys throws IllegalStateException.