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

Raise an exception on an array of values being sent as the factor for a field_value_factor query #9246

Conversation

reuben-sutton
Copy link
Contributor

closes #7408

@reuben-sutton
Copy link
Contributor Author

@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) {
Copy link
Member

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?

@dakrone
Copy link
Member

dakrone commented Jan 21, 2015

@reuben-sutton left one comment here, if you can address that I will merge this!

@reuben-sutton
Copy link
Contributor Author

Hi @dakrone - just pushed the change requested. Sorry it took so long!

@dakrone
Copy link
Member

dakrone commented Feb 3, 2015

@reuben-sutton looks great, if you squash it into a single commit I will push it!

@reuben-sutton reuben-sutton force-pushed the field_value_factor_error_on_array branch from 857d74d to d0c5d8c Compare February 4, 2015 17:29
@reuben-sutton
Copy link
Contributor Author

Thanks @dakrone. Squashed!

On Tue, Feb 3, 2015 at 8:43 PM, Lee Hinman notifications@github.com wrote:

@reuben-sutton https://github.com/reuben-sutton looks great, if you
squash it into a single commit I will push it!


Reply to this email directly or view it on GitHub
#9246 (comment)
.

@dakrone
Copy link
Member

dakrone commented Feb 4, 2015

Merged this to master and 1.x, thanks @reuben-sutton !

@dakrone dakrone closed this Feb 4, 2015
@clintongormley clintongormley changed the title Raise an exception on an array of values being sent as the factor for a ... Raise an exception on an array of values being sent as the factor for a field_value_factor query Jun 7, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

field_value_factor accepts arrays values, does not throw error
3 participants