Is it possible to produce a script field for use in an Aggregation

I want to use a script field as part of an aggregation. But this script field needs to use a field then lookup some external data to return the new field.

How can this be realized?

For the most part we try our best not to allow something like that because it'll make the search super duper slow and block a thread that isn't designed to be blocked.

Your best bet is getting all the data up front and passing it as a parameter to the script if it is small or updating the documents with the data if the data is large.

Yes, I am aware of the performance implications, but the search is not time sensitive. I have considered those options but unfortunately they are not available.
I want to know how I could go about coding this requirement. I have tried using a Java Native Plugin but I'm not certain what interface to implement.
Thanks.

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