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

[30%] HSEARCH-1872 Create a proper API for sorting definitions #1132

Closed

Conversation

emmanuelbernard
Copy link
Member

This PR shows the interface needed to implement the DSL.
One can already play with it and compile the test code, not run it.

* For distance sort without a query, use {@code byField("location").fromCoordinates(...)}
* or {@code byField("location").fromLatitude(...)}
*/
SortDistanceContext byDistanceFromSpatialQuery(Query query);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here I'm wondering if we could avoid references to the Lucene type 'query'.

Assuming in a next step we'll be able to control the Sort DSL directly on the Query Builder (the existing Query DSL), then such a thing would go away right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we generalise the DSL, this would naturally be using the right generic type. I did not see a point in working on that now.

@gsmet
Copy link
Member

gsmet commented Aug 19, 2016

Closing for now. Yoann is working on a new PR superseding this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants