new DistanceSortField doesn't work with FullTextQuery#setMaxResults

Description

The new DistanceSortField does not work when used with MaxResults set to something smaller than the number of documents stored.

The error is easy to reproduce, just add the following to the org.hibernate.search.test.jpa.SpatialQueringJPATest in module hibernate-search-orm

In hibernate-search-orm run it with mvn -Dtest=SpatialQueringJPATest test

Result is:

Environment

Java 7, Hibernate 4.1.7, MySQL

Activity

Show:
Sanne Grinovero
October 18, 2012, 9:55 PM

Thanks!

Michael Simons
October 19, 2012, 11:08 AM

Thank you for the great work

Nicolas Helleringer
November 16, 2012, 11:02 AM

I have re submitted the pull request with usage of lucene own IntToDoubleMap.

It shall be more efficient in memory usage and speed.

Fixed

Assignee

Nicolas Helleringer

Reporter

Michael Simons

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Fix versions

Affects versions

Priority

Major
Configure