Navigation

Lucene Query Structured Summary

The explain response of a search command contains information about the query executed with that command. The response includes structured details of what Lucene queries Atlas Search executed to satisfy a $search query.

This page contains:

  • Some of the Lucene queries that Atlas Search operators create
  • Lucene query options that are included in the structured summary
  • Lucene query structured summary example for each Lucene query type
Note
About the Examples

The examples in this section are based on queries run against the sample datasets with the queryPlanner verbosity mode. In the example response, the:

  • mongotQuery field shows the Atlas Search operator and the query that was run.
  • explain.type field shows the Lucene Query that the operator created.

For complete examples, see Examples.

BooleanQuery

For Lucene BooleanQuery, the structured summary includes details on the following options:

Field
Type
Necessity
Description
must
Optional
Clauses which must match.
mustNot
Optional
Clauses which must not match.
should
Optional
Clauses which should match.
filter
Optional
Clauses which must all match.
minimumShouldMatch
Integer
Optional
The minimum number of should clauses which must match.
ConstantScoreQuery

For constant score queries, the structured summary includes details on the following options:

Field
Type
Necessity
Description
query
Required
Child of the ConstantScoreQuery.
FunctionScoreQuery

For Lucene FunctionScoreQuery queries, the structured summary includes details on the following options:

Field
Type
Necessity
Description
scoreFunction
string
Required
Scoring expression used in the query.
query
Required
The query.
LatLonPointDistanceQuery

For Lucene LatLonPointDistanceQuery queries, the response contains an Explain Timing Breakdown only.

LatLonShapeQuery

For Lucene LatLonShapeQuery queries, the response contains an Explain Timing Breakdown only.

LongDistanceFeatureQuery

For Lucene LongDistanceFeatureQuery, the response contains an Explain Timing Breakdown only.

MultiTermQueryConstantScoreWrapper

For Lucene MultiTermQueryConstantScoreWrapper queries, the structured summary includes details on the following arguments:

Field
Type
Necessity
Description
queries
Required
List of queries.
PhraseQuery

For Lucene PhraseQuery queries, the structured summary includes details on the following arguments:

Field
Type
Necessity
Description
path
string
Required
Indexed field to search.
query
string
Required
String or strings to search for.
slop
int
Required
Allowable distance between words in the query phrase.
PointRangeQuery

For Lucene PointRangeQuery queries, the structured summary includes details on the following arguments:

Field
Type
Necessity
Description
path
string
Required
Indexed field to search.
representation
string
Optional
Numeric representation. Queries over date-typed data do not include representation.
gte
number
Optional
Lower bound of the query.
lte
number
Optional
Upper bound of the query.
TermQuery

For term queries, the structured summary includes details on the following arguments:

Field
Type
Necessity
Description
path
string
Required
Indexed field to search.
value
string
Required
String to search for.
Default

Lucene queries that are not explicitly defined by another Lucene query are serialized using the default query. The structured summary includes details on the following option:

Field
Type
Necessity
Description
queryType
string
Required.
Type of Lucene query.
Give Feedback