I have written a custom plugin implementing FilterScript and noticed on large data sets it is quite slow; so I changed the execute method to simply return 'true' and removed all other computation. Then removed and reinstalled the plugin and restarted the elasticsearch service and it still seems to slow?
Is this an issue/overhead with filters?
I'm using ElasticSearch 7.4.0
(running on a hosted vSphere Ubuntu18.04 VM with 24GB and 4 CPUs)
Query with my filter processing:
{"took":4448,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":10000,"relation":"gte"},"max_score":11.8465395,"hits":[{...}]}}
Query with filter returning true:
{"took":4391,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":10000,"relation":"gte"},"max_score":11.8465395,"hits":[{...}]}}
Query without using the filter:
{"took":80,"timed_out":false,"_shards":{"total":1,"successful":1,"skipped":0,"failed":0},"hits":{"total":{"value":10000,"relation":"gte"},"max_score":11.8465395,"hits":[{...}]}}
Kind regards,
Paul