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

Has child query forces default similarity #16611

Closed

Conversation

gpstathis
Copy link
Contributor

@martijnvg, should already have a CLA signed from #4977. Closes #16550.

@martijnvg
Copy link
Member

@gpstathis Thanks! The change looks good. Can you squash the commits into a single commit?

@gpstathis
Copy link
Contributor Author

@martijnvg done!

@martijnvg martijnvg added the >bug label Feb 12, 2016
@@ -1926,4 +1927,51 @@ public void testHasChildInnerQueryType() {
QueryBuilders.hasChildQuery("child-type", new IdsQueryBuilder().addIds("child-id"))).get();
assertSearchHits(searchResponse, "parent-id");
}

Copy link
Contributor

Choose a reason for hiding this comment

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

@martijnvg can we do this with a unittest HasChildQueryBuilderTests should be able to verify this?

Copy link
Member

Choose a reason for hiding this comment

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

agreed, that is better. We should just test the integration part here (whether non default similarity gets applied) and not whether right scores get computed.

Copy link
Member

Choose a reason for hiding this comment

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

I'll add this test on top of this pr. For the 2.x branches we should still use the integ tests, since that is the only way to tests this stuff there.

@martijnvg martijnvg self-assigned this Feb 15, 2016
@martijnvg
Copy link
Member

@gpstathis I pushed this to master: b17a92c

and I replaced the integration test with a unit test instead: 3290cfb

When back porting to 2.x, your integration tests will guard that that the similarity is properly passed down the IndexSearcher.

@gpstathis
Copy link
Contributor Author

Thanks @martijnvg.

@clintongormley clintongormley changed the title Fixes #16550 - Has child query forces default similarity Has child query forces default similarity Mar 9, 2016
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Parent/Child labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories v2.1.3 v2.2.1 v2.3.0 v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants