Skip to content

Conversation

alexksikes
Copy link
Contributor

Relates to #10217

This PR is against the query-refactoring branch.

@javanna
Copy link
Member

javanna commented Sep 9, 2015

@cbuescher can you review this once you are done with the match query please?

}
return null;
}

Copy link
Member

Choose a reason for hiding this comment

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

I think Object readGenericValue() works for Float and we don't need this.

@cbuescher
Copy link
Member

@alexksikes did a first round of reviews. Since this query relies much in MatchQueryBuilder which is currently WIP in #13402, there is a bit of movement here. Also, in working on the match query I first went with having many fields as optional objects, but after discussion today changed many to using primitive types plus defaults. Maybe this applies in other places for this PR as well.

Relates to elastic#10217

This PR is against the query-refactoring branch.

Closes elastic#13405
@alexksikes alexksikes force-pushed the feature/query-refactoring-multi-match-query branch from 93f6831 to 8496c27 Compare September 12, 2015 11:36
@alexksikes
Copy link
Contributor Author

@cbuescher I rebased and addressed all the comments. Thanks for the review.

@Override
protected void setFinalBoost(Query query) {
query.setBoost(boost * query.getBoost());
}
Copy link
Member

Choose a reason for hiding this comment

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

Took me some time to get this overwrite, maybe some javadocs would help here.

Copy link
Member

Choose a reason for hiding this comment

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

I think the base method in AbstractQueryBuilder has already extensive javadocs, maybe we can add a simple comment here explaining that the query might get a boost coming out of field boosts parsing, which we need to combine with the boost assigned to the query as part of the query dsl.

That said, I don't see this same behaviour in master, it feels like it is the right behaviour especially looking at what query_string does, but on master we actually replace the parsed boost with the boost assigned to the query in the query DSL.

Maybe open a separate issue and mark it fixed together with this PR so we at least keep track of this small change?

@cbuescher
Copy link
Member

@alexksikes left a few comments, very minor and mostly open questions on my side. Not sure if someone else should take a final look, otherwise looks good to me.

@alexksikes
Copy link
Contributor Author

@cbuescher I addressed all the comments. In some specific cases MatchQueryBuilder (and so does MultiMatch) fails on date fields, which is untested yet on MatchQueryBuilder. I'll open a PR for this. Thanks for the review.

@cbuescher
Copy link
Member

Had a look at the last changes, LGTM

alexksikes added a commit that referenced this pull request Sep 16, 2015
Relates to #10217

This PR is against the query-refactoring branch.

Closes #13405
@alexksikes alexksikes closed this Sep 16, 2015
@alexksikes alexksikes deleted the feature/query-refactoring-multi-match-query branch September 16, 2015 12:03
qwerty4030 added a commit to qwerty4030/elasticsearch that referenced this pull request Jul 23, 2016
…ession results in no fields.

The query will now return 0 hits (null query) instead of throwing an exception. This matches the behavior if a nonexistent field is specified.
These changes were backported from latest master (mostly from elastic#13405).
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query Refactoring labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants