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

Remove Version.V_6_0_0 constant from PercolatorMatchedSlotSubFetchPhase #41995

Merged

Conversation

martijnvg
Copy link
Member

No description provided.

@martijnvg martijnvg added >non-issue :Search Relevance/Percolator Reverse search: find queries that match a document v8.0.0 labels May 9, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

I left one question

// for now we just use version 6.0 version to find nested parent
final Version version = Version.V_6_0_0; //context.mapperService().getIndexSettings().getIndexVersionCreated();
Weight weight = percolatorIndexSearcher.createWeight(percolatorIndexSearcher.rewrite(Queries.newNonNestedFilter(version)),
Query nonNestedQuery = Queries.newNonNestedFilter(indexVersionCreated);
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove the version here too since it only checks if the index was created before 6.1.0. We can do this in a follow up but we probably don't need to add the indexVersionCreated param here and just use CURRENT until we remove it from newNonNestedFilter ?

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 That makes sense. I will update this PR.

@martijnvg martijnvg requested a review from jimczi May 9, 2019 09:37
Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

LGTM, I'll open a new pr to remove the version in newNonNestedFilter.

@martijnvg martijnvg merged commit 44fa35a into elastic:master May 9, 2019
@jimczi
Copy link
Contributor

jimczi commented May 9, 2019

I'll open a new pr to remove the version in newNonNestedFilter.

There's already a pr opened to remove all use of v6 constants:
#41965

gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
…se (elastic#41995)

and use Version.CURRENT instead of passing down index created version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search Relevance/Percolator Reverse search: find queries that match a document v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants