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

In QueryString cannot use [fields] parameter in conjunction with [default_field] #1352

Merged
merged 1 commit into from Aug 18, 2017

Conversation

Projects
None yet
2 participants
@p365labs
Copy link
Collaborator

p365labs commented Aug 17, 2017

In QueryString cannot use anymore [fields] parameter in conjunction with [default_field]. There was a test failing because of an exception : QueryValidationException

After having a look a the docs on Es6 Breaking changes I did not find anything reporting this BC, the only way to check it is having a look at Elasticsearch 6.0+ source code.

Inside QueryStringQueryBuilderTests.java there a new test testDefaultFieldsWithFields which checks exactly if both parameters are set and in case raise a QueryValidationException.

I also implement a test to check for that Exception.

@p365labs p365labs force-pushed the p365labs:es6_default_field_and_fields branch from db8b09c to b3ae3a3 Aug 17, 2017

@p365labs p365labs changed the title In QueryString cannot use [fields] parameter in conjunction with [default_field] [WIP] In QueryString cannot use [fields] parameter in conjunction with [default_field] Aug 17, 2017

@p365labs

This comment has been minimized.

Copy link
Collaborator Author

p365labs commented Aug 17, 2017

Hi @ruflin I changed the title in [WIP] as I have to inspect why some tests fails on travis. Wait on merging this one. TNX

@p365labs

This comment has been minimized.

Copy link
Collaborator Author

p365labs commented Aug 17, 2017

The problem seems that the Exception return query_validation_exception not in the same position of the array. Instead of using assertEquals and validate the value of a specific position $error['failed_shards'][0]['reason']['caused_by']['type'] I tried assertContains; like that seem to work. Waiting for tests to execute on Travis :)

@p365labs p365labs force-pushed the p365labs:es6_default_field_and_fields branch 3 times, most recently from 5a4dc6d to 37aa08b Aug 17, 2017

@ruflin

This comment has been minimized.

Copy link
Owner

ruflin commented Aug 17, 2017

@p365labs CI is green, but the usual changelog conflicts.

@ruflin

ruflin approved these changes Aug 17, 2017

@p365labs p365labs force-pushed the p365labs:es6_default_field_and_fields branch from 37aa08b to 4fe418a Aug 17, 2017

@p365labs p365labs changed the title [WIP] In QueryString cannot use [fields] parameter in conjunction with [default_field] In QueryString cannot use [fields] parameter in conjunction with [default_field] Aug 17, 2017

@ruflin ruflin merged commit d8362c9 into ruflin:master Aug 18, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@p365labs p365labs deleted the p365labs:es6_default_field_and_fields branch Aug 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment