Hello,
I'm writing a custom plugin that allows filtering/scoring using an external service. The overhead of calling the service is relatively high: filtering a single document takes 80ms, filtering 10k documents takes 100ms. I therefore want to avoid performing single-document calls.
For a simple query/filter this is easy - I can collect all data from a segment and do a batch call to the service.
But if I want to process the data using post_filter
/rescore
it doesn't work - I'm not able to get information about which documents were hits before I need to call the service.
Does anyone have any ideas on how I could solve this?