Fetch time too slow for a query that only needs documents ids


(Max Söderlund) #1

Hi there, I'm working on a query that only needs to get the id's of the results. I'm doing this with a scan/scroll search, however, the size of the fetch time for the results is too big for a realtime application (over 30 millions documents). I need to get only the id's, setting setNoFields() doesn't avoid the fetch time so I'm considering implementing a plugin for extending elasticsearch and avoid the fetch phase, but I don't know where to start or if this is even posible.

Any help is welcome, thanks!


(Gcampbell) #2

I'm very interested in this as well. It would be great if there were an option in Elastic's API to optimize for returning only IDs. Omitting the fetch phase of the search seems like the right place to start.

Also, interested in implementing a plugin. Max, have you made progress on this?


(system) #3