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

HSEARCH-3441 + HSEARCH-3623 Improve naming consistency of DSL/builder methods #2070

Merged
merged 12 commits into from Sep 9, 2019

Conversation

@yrodiere
Copy link
Member

yrodiere commented Aug 30, 2019

  • HSEARCH-3441: Search 6 groundwork - Improve naming consistency of DSL/builder methods
  • HSEARCH-3623: Harmonize the syntax of analysis definition DSLs
@yrodiere yrodiere force-pushed the yrodiere:HSEARCH-3441 branch 2 times, most recently from d7b3960 to da4da74 Aug 30, 2019
yrodiere added 12 commits Aug 29, 2019
…ch analysis definition DSL

For consistency with the Lucene analysis definition DSL.
…sis definition DSLs

They were deprecated two releases ago, in 6.0.0.Alpha8.

The only removed "feature" is the ability to chain analyzer definitions
in the Lucene analysis definition DSL, which was deprecated as part of
6.0.0.Alpha8. This is more consistent with the Elasticsearch analysis
definition DSL.
* withConstantScore() => constantScore()
* boostedTo(float) => boost(float)
* withAndAsDefaultOperator() => defaultOperator(BooleanOperator.AND)
* withSlop(int) => slop(int)

Old methods were deprecated, not removed.
…c mapping DSL

For consistency with pretty much every other method in this DSL and
other DSLs.
For consistency with other DSLs (predicate, projections).
… predicate DSL
…ods in the predicate DSL

For consistency with the projection, sort and aggregation DSLs.

One big advantage is that calls to .field() no longer give the
impression that the predicate will match if *any* field matches.
This is currently true, but there are plans to provide options to tune
this: https://hibernate.atlassian.net/browse/HSEARCH-3327
…ry methods without a "by" prefix
…elds() methods instead of onField()/orField()/...
* onMissingValue() => missing()
* sortLast() => last()
* sortFirst() => first()
… sort DSL
@yrodiere yrodiere force-pushed the yrodiere:HSEARCH-3441 branch from da4da74 to a57d899 Sep 3, 2019
@fax4ever fax4ever self-requested a review Sep 9, 2019
@fax4ever fax4ever self-assigned this Sep 9, 2019
Copy link
Contributor

fax4ever left a comment

That's nice. I think that the new API is simpler.
+1 to merge it

@yrodiere yrodiere merged commit 1533383 into hibernate:master Sep 9, 2019
3 of 4 checks passed
3 of 4 checks passed
SonarCloud Code Analysis Quality Gate failed
Details
LGTM analysis: Java No new or fixed alerts
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
coverage/coveralls First build on HSEARCH-3441 at 89.005%
Details
@yrodiere

This comment has been minimized.

Copy link
Member Author

yrodiere commented Sep 9, 2019

Merged, thanks!

@yrodiere yrodiere deleted the yrodiere:HSEARCH-3441 branch Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.