Search type to return list of matching fields

Hi.
Would very much appreciate some assistance with this question, please.

Lets say that I have an index "instances" and in that index I have documents like:

{
  "field1" : "Something",
  "field2" : "Something else",
  "unique_ids" : "AD776335"
}

{
  "field1" : "Something",
  "field2" : "Something else",
  "unique_ids" : "AD776339"
}

{
  "field1" : "Something",
  "field2" : "Something else",
  "unique_ids" : "AD776341"
}

So what I need is a query where what would be returned would look like:

{ 
  "unique_ids" : "AD776335",
  "unique_ids: : "AD776339",
  "unique_ids: : "AD776341"
}

Does that make any sense? Is this possible?

Thanks.

May be a terms aggregation on unique_ids field?

But it won't produce exactly what you asked for.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.