Skip to content

Conversation

@javanna
Copy link
Member

@javanna javanna commented Mar 30, 2021

We currently use a TriFunction that takes the field name, the script params and the search lookup and returns a LeafFactory. Name and script params never change though and are available when the function is created, so the tri function can become a function search lookup -> leaf factory which is much easier to reason about.

We currently use a TriFunction that takes the field name, the script params and the search lookup and returns a LeafFactory. Name and script params never change though and are available when the function is created, so the tri function can become a function search lookup -> leaf factory which is much easier to reason about.
@javanna javanna added :Search Foundations/Mapping Index mappings, including merging and defining field types >refactoring v8.0.0 v7.13.0 labels Mar 30, 2021
@javanna javanna requested a review from romseygeek March 30, 2021 08:13
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Mar 30, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

import org.elasticsearch.index.mapper.Mapper;
import org.elasticsearch.index.mapper.RuntimeField;
import org.elasticsearch.index.mapper.TextSearchInfo;
import org.elasticsearch.index.mapper.ValueFetcher;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a funny one, there were unused imports but checkstyle was not complaining? This comes from the recent package change I think.

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice clean up, LGTM

@javanna
Copy link
Member Author

javanna commented Mar 30, 2021

run elasticsearch-ci/1

@javanna javanna merged commit 9576f3e into elastic:master Mar 31, 2021
javanna added a commit to javanna/elasticsearch that referenced this pull request Mar 31, 2021
We currently use a TriFunction that takes the field name, the script params and the search lookup and returns a LeafFactory. Name and script params never change though and are available when the function is created, so the tri function can become a function search lookup -> leaf factory which is much easier to reason about.
javanna added a commit that referenced this pull request Mar 31, 2021
We currently use a TriFunction that takes the field name, the script params and the search lookup and returns a LeafFactory. Name and script params never change though and are available when the function is created, so the tri function can become a function search lookup -> leaf factory which is much easier to reason about.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>refactoring :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v7.13.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants