I want to retrieve a list of documents of the same type based on document IDs - Multi GET API works great.
Now, I would like to sort the documents based on a specific field of that type.
Is it possible to sort the list using MGET API on ES side? Or, do I need to sort it on the client side?
Thanks for reply. I'm not sure if I can use this when I have a list of document IDs on the input.
Let me rephrase my question. I would like to retrieve a list of documents (of the same type) when I have a list of document IDs. And, the result list would be sorted by some field.
I know I can retrieve the list using MGET. But I do not know how to sort it (on ES).
Instead of a multiget, you can use the ids query. That query can be combined with a sort clause to sort the documents however you want those to be sorted.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.