elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

Fix DLS over Runtime Fields

Open original-brownbear opened this issue 1 year ago • 0 comments

The deeper issue fixed here is that we are reusing the same Query instance across multiple individual per-segment searches (for the per-segment bit-set). There really is no way of making the current state management in runtime field scripts work without making the SourceProvider somehow aware of the concrete leaf or parent context it's dealing with. This is the simplest fix I could think of, though it does admittedly come with some overhead. A CHM lookup is more costly than an array lookup. Marking this WIP and draft so we can discuss what tradeoffs we want to make here .

Fixes #111637

original-brownbear avatar Aug 27 '24 22:08 original-brownbear