The query to match against documents in the index. A query
is a boolean expression containing terms. For example, the query
'job tag:"very important" sent <= 2011-02-28'
finds documents with the term job in any field, that contain the
phrase "very important" in a tag field, and a sent date up to and
including 28th February, 2011. You can use combinations of
'(cat OR feline) food NOT dog'
to find documents which contain the term cat or feline as well as food,
but do not mention the term dog. A further example,
'category:televisions brand:sony price >= 300 price < 400'
will return documents which have televisions in a category field, a
sony brand and a price field which is 300 (inclusive) to 400
(exclusive). See
https://developers.google.com/appengine/docs/python/search/overview#Expressions
for a list of expressions that can be used in queries.
options
A QueryOptions describing post-processing of search results.
enable_facet_discovery
discovery top relevant facets to this search query
and return them.
return_facets
An iterable of FacetRequest or basestring as facet name to
return specific facet with the result.
facet_options
A FacetOption describing processing of facets.
facet_refinements
An iterable of FacetRefinement objects or refinement
token strings used to filter out search results based on a facet value.
refinements for different facets will be conjunction and refinements for
the same facet will be disjunction.
Raises
QueryError
If the query string is not parseable.
Attributes
enable_facet_discovery
Returns true if facet disocery is on.
facet_options
Returns FacetOptions defining processing of facets.
facet_refinements
Returns list of facet refinements.
options
Returns QueryOptions defining post-processing on the search results.
query_string
Returns the query string to be applied to search service.
return_facets
Returns the list of specific facets to be included with the result.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-26 UTC."],[[["This document describes the `Query` class, which is used to create a request for the search service to query an index."],["The `query_string` argument is a boolean expression used to match documents in the index, allowing for complex queries with terms, phrases, and date ranges."],["The `Query` object allows for post-processing of search results via `options`, including facet discovery with `enable_facet_discovery`."],["The class also supports the returning of specific facets using `return_facets` and filtering search results by `facet_refinements`."],["The `Query` class will raise a `QueryError` if the `query_string` provided is invalid or not parseable."]]],[]]