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

Query DSL: deprecate _name and boost in short variants of queries #12966

Closed

Conversation

javanna
Copy link
Member

@javanna javanna commented Aug 18, 2015

As discussed in #11744 this is the last step to unify parsing of boost and _name. Those fields are supported only in long version of queries, while we sometimes parse them when wwe shouldn't, inconsistently.

Closes #11744

@jpountz
Copy link
Contributor

jpountz commented Aug 19, 2015

LGTM

@javanna javanna removed the review label Aug 19, 2015
@javanna javanna force-pushed the enhancement/query_name_boost_leftovers branch from 4c21b7f to cd99e34 Compare August 19, 2015 09:24
@javanna javanna force-pushed the enhancement/query_name_boost_leftovers branch from cd99e34 to 8b804d1 Compare August 19, 2015 09:53
@javanna javanna force-pushed the enhancement/query_name_boost_leftovers branch from 8b804d1 to 88631a2 Compare August 19, 2015 10:31
@javanna
Copy link
Member Author

javanna commented Aug 19, 2015

Turns out that using ParseField against _name causes problems, since we internally convert it to its camelCase variant, which becomes name and then the term query cannot query anymore a field called name, which is not good.

I made a little adjustment to Strings#toCamelCase so that if the first character is _ it leaves it untouched e.g. _name stays as-is while _invalid_name becomes _invalidName. To be honest I am a bit afraid of what this change might break... other opinions are more than welcome.

@jpountz
Copy link
Contributor

jpountz commented Aug 21, 2015

Can you add unit tests for toCamelCase given the changes you made?

@javanna javanna force-pushed the enhancement/query_name_boost_leftovers branch from 88631a2 to 42e55c4 Compare August 21, 2015 10:46
@javanna
Copy link
Member Author

javanna commented Aug 21, 2015

Can you add unit tests for toCamelCase given the changes you made?

done! are we sure this change is ok? I am a bit afraid of the consequences it might have, that we may not realize at the moment.

@jpountz
Copy link
Contributor

jpountz commented Aug 24, 2015

This might only have bad impact on camel case, which I'm not too scared to break as none of our examples promotes it and it is on the way out (#8988).

@javanna javanna added the v2.1.0 label Aug 27, 2015
As discussed in elastic#11744 this is the last step to unify parsing of boost and _name. Those fields are supported only in long version of queries, while we sometimes parse them when wwe shouldn't, inconsistently.

Closes elastic#11744
Closes elastic#12966
@javanna javanna force-pushed the enhancement/query_name_boost_leftovers branch from 42e55c4 to 0384f0a Compare August 27, 2015 09:56
@javanna javanna closed this in dc807f2 Aug 27, 2015
javanna added a commit to javanna/elasticsearch that referenced this pull request Aug 27, 2015
As discussed in elastic#11744 this is the last step to unify parsing of boost and _name. Those fields are supported only in long version of queries, while we sometimes parse them when wwe shouldn't, inconsistently.

Closes elastic#11744
Closes elastic#12966
@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
>deprecation >enhancement :Search/Search Search-related issues that do not fall into other categories v2.0.0-beta2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants