[Derived Fields] Add basic query support with derived fields #12508
Labels
enhancement
Enhancement or improvement to existing feature or request
Search
Search query, autocomplete ...etc
Is your feature request related to a problem? Please describe
Once the derived field mapper is added, basic query support with derived fields will need to be implemented.
Describe the solution you'd like
Add a new Query (ex.
DerivedFieldQuery
orDerivedFieldMatchQuery
if there will be multiple types) which takes a parent query and the derived field mapper objects (there can be multiple derived fields mentioned in a query).The query will create a custom weight function (somewhat similar to
SourceFieldMatchQuery
) and execute the parent query. In the two phase iterator matches(), it will fetch the value of matching document executing the painless script associated with the runtime mapper field object. It will create a LuceneMemoryIndex
with just one field oftype
fetched from mapper field object and value just fetched using painless script by executing against matched document _source.Related component
Search
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: