Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Derived Fields] Add basic query support with derived fields #12508

Closed
qreshi opened this issue Mar 1, 2024 · 1 comment · Fixed by #12746, #12808, #12837 or #12850
Closed

[Derived Fields] Add basic query support with derived fields #12508

qreshi opened this issue Mar 1, 2024 · 1 comment · Fixed by #12746, #12808, #12837 or #12850
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Search Search query, autocomplete ...etc

Comments

@qreshi
Copy link
Contributor

qreshi commented Mar 1, 2024

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 or DerivedFieldMatchQuery 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 Lucene MemoryIndex with just one field of type 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

@qreshi qreshi added enhancement Enhancement or improvement to existing feature or request untriaged labels Mar 1, 2024
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Mar 1, 2024
@qreshi qreshi mentioned this issue Mar 1, 2024
6 tasks
@rishabhmaurya rishabhmaurya moved this from Todo to In Progress in Performance Roadmap Mar 4, 2024
@rishabhmaurya
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment