Search Query Format
This is a comprehensive guide to Elasticsearch's query format, detailing the diverse query types available for precise search operations. The queries covered include match, term, terms, prefix, regexp, range, exists, geo_distance, geo_bounding_box, and geo_polygon. Each query type includes JSON examples and practical explanations for their specific applications.
This guide provides developers with an in-depth understanding of how to effectively leverage Elasticsearch's diverse querying capabilities for their search requirements.
This field allows you to search for records that match a certain condition. It is an array that consists of objects with a "key" and a "value".
This field is used to search for records that exactly match a given condition. The condition is specified as an array of objects with a "key" and a "value". The query examples below include a string, a number, and a boolean value
Here are some examples of term queries:
This field is used to search for records where the specified key's value is in the list of specified values. It's an array of objects with a "key" and an array of "values". The "values" can be an array of strings, numbers, or booleans.
Here are some examples of terms queries:
This query is used to search for records that begin with the provided value for the given key. The value is case-sensitive.
This query is used to search for records that match a regular expression pattern for the given key.
This query is used to search for records where the specified key's value falls within the given range.
Here are some examples:
This query is used to search for records where the specified key is present.
Here are some examples:
Query 1
This query is used to search for records where the specified key's coordinates fall within a specified radius from a given point.
Here are some examples:
Query 1
This query is used to search for records where the specified key's coordinates fall within a specified bounding box.
This query is used to search for records where the specified key's coordinates fall within a specified polygon.