Key Value Query
A key–value search (SPEC.md §4): objects with a member key whose value, or an element of whose array value, equals value.
mode: ResultMode.WHOLE_DOCUMENT (the default) makes each matching document a hit, with the root as the hit's node; ResultMode.CONTAINING_ELEMENT each object that contains a match.
nested: with NestedHits.OUTERMOST_ONLY, a containing object inside another containing object of the same document is dropped.
limit: at most this many hits per page.
maxBytes: a page also ends before a hit that would take the sum of the page's SearchHit.encodedSizes above this; a page always holds at least one hit. Long.MAX_VALUE means no byte budget.
after: resume strictly past this cursor's
(docId, nodePre)in order. A cursor from a search of the other order, or from a TypePage, is refused with InvalidCursorException.type: only containing objects of this type match (SPEC.md §6.2); in WHOLE_DOCUMENT mode a document is a hit when one of its objects of this type contains a match. A search with an invalid name throws InvalidTypeNameException.
order: the order of the hits (SPEC.md §4.4). SearchOrder.DESCENDING with
limit = 1gives the newest hit.
Queries are values: two instances with the same settings are equal, and copy derives a variant.
Constructors
Properties
Functions
This query with the given settings changed; the result is validated like a new instance.