Native Filter Scripts + Caching may be broken

(Matt Chambers) #1

Version 1.5.2

I wrote a native filter script for Elastic and I noticed that a new instance of the script is created for every document returned.


I assumed that cache=true would cache the instance of the script created by the factory, but I guess I was wrong. I can put my own caching in the factory but I figured I'd check and see if this was the intended behavior or cache=true.

(Matt Chambers) #2

Actually, looks like one instance is created per thread which is better than what I thought it was doing. I needed more results in my test.

So i guess cache must hold onto those instances between searches. Would be great to have a way to time the cache out.

(system) #3