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
Raise an exception on an array of values being sent as the factor for a field_value_factor
query
#9246
Raise an exception on an array of values being sent as the factor for a field_value_factor
query
#9246
Conversation
@dakrone could you review please? |
@@ -70,6 +70,8 @@ public ScoreFunction parse(QueryParseContext parseContext, XContentParser parser | |||
} else { | |||
throw new QueryParsingException(parseContext.index(), NAMES[0] + " query does not support [" + currentFieldName + "]"); | |||
} | |||
} else if("factor".equals(currentFieldName) && token == XContentParser.Token.START_ARRAY) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a check for XContentParser.Token.START_OBJECT
as well here, since it can't be an object either?
@reuben-sutton left one comment here, if you can address that I will merge this! |
Hi @dakrone - just pushed the change requested. Sorry it took so long! |
@reuben-sutton looks great, if you squash it into a single commit I will push it! |
… a field_value_factor query closes elastic#7408
857d74d
to
d0c5d8c
Compare
Thanks @dakrone. Squashed! On Tue, Feb 3, 2015 at 8:43 PM, Lee Hinman notifications@github.com wrote:
|
Merged this to master and 1.x, thanks @reuben-sutton ! |
field_value_factor
query
closes #7408