0

My query returns a single field of every document i have. Instead of returning millions of results, how can i aggregate them and return a single bucket?

1 Answer 1

1

If your query has something like:

"_source": {field_name}

It's normal that the results only return the field "field_name" of all the documents that matched with your query.

On the other hand, you should seriously consider upgrading your ES version. At least use any of the 6.x versions or superior.

A lot of functions, calls and aggregations has been removed or added. This with the goal of improving your experience with ES. In other words, staying in older versions will be a pain in the back.

Sign up to request clarification or add additional context in comments.

1 Comment

The issue with using the "_source" is that it will imply several million results, that will be paginated and fetched. If i managed to aggregate them, i can retrieve them all in a single large request, instead of several thousands small ones

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.