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

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

Merged
merged 1 commit into from
Aug 18, 2017

Conversation

p365labs
Copy link
Collaborator

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 es6_default_field_and_fields branch from db8b09c to b3ae3a3 Compare August 17, 2017 10:47
@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
Copy link
Collaborator Author

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
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 es6_default_field_and_fields branch 3 times, most recently from 5a4dc6d to 37aa08b Compare August 17, 2017 12:45
@ruflin
Copy link
Owner

ruflin commented Aug 17, 2017

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

@p365labs p365labs force-pushed the es6_default_field_and_fields branch from 37aa08b to 4fe418a Compare August 17, 2017 14:27
@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
@p365labs p365labs deleted the es6_default_field_and_fields branch August 18, 2017 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants