I have a lucene.net-index having fields like "title", "description" and something else.
For searching I use the TopScoreDocDollector. If I search the result is prioritized by Lucenes score.
Now, some results have the same score and Lucene sort the documents first by score, second by create-date in index.
I would´ve first sorting by Lucene-score and second by Lucene-score of the "title"-field. Is there such a thing?
I only find a way for sorting first by Lucene-score and second by title alphabetically.
1
votes
2 Answers
1
votes
0
votes
This doesn't really make sense. If the title fields don't get the same score, it would be reasonable to assume the overall score won't be the same either, so your secondary sort would never actually have any effect on the order. The case where overall score is the same but the score for particular field is different is fairly unlikely.
If you meant the reverse, to sort first on title score, then on overall score, I would just do that by boosting the title field. Index-time boosting might make the most sense in this case.