We're updating the issue view to help you get more done. 

Search results not sorted properly

Description

Trying to index a simple relationship between a Person and a collection of Names. There are 2 issues:
1) The document containing the Person fields contains each name of that person TWICE. I think this may be affecting the score that the document receives.
2) The search results are not ordered correctly. If I have one person with only one name: "Sly Stallone" and other people with multiple names, out of which one contains only "Sly" or only "Stallone", the people with multiple names have a higher score than the person with only one name that matches the search perfectly.

Here's the original thread that started this issue:
https://forum.hibernate.org/viewtopic.php?f=9&t=1005019&sid=6f1870a4b18a0f2fbcc8c55e6c34671b

I've attached a maven project which contains a test that fails.

Environment

Hibernate 3.5.1-Final, MySQL 5.1.6

Status

Assignee

Unassigned

Reporter

Florin Haizea

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Affects versions

3.2.0.Final

Priority

Critical