Elasticsearch Term Level Queries – Type & Ids Query

In this tutorial, we’re gonna look at way to use Elasticsearch Type Query and Ids Query.

Type Query

type query matches documents with provided type:

Response with “customer” type:

Ids Query

ids query matches documents that only have the provided ids (_uid field):

Response:

type is optional and can be omitted (all types defined in the index mapping are tried):

type is also an array of values:

By JavaSampleApproach | November 8, 2017.

Related Posts


Got Something To Say:

Your email address will not be published. Required fields are marked *

*