djscherrer opened a new pull request, #3124:
URL: https://github.com/apache/jackrabbit-oak/pull/3124

   **Problem Description**
   Ordering a full-text query by an indexed property and jcr:score
   (e.g. ORDER BY [foo] DESC, [jcr:score] DESC) dropped jcr:score from the
   Lucene sort and executed a field sort without score tracking, so the
   secondary relevance ordering was lost and the projected jcr:score was NaN.
   
   **Implemented Fix**
   getSort now keeps jcr:score as a real relevance sort field
   (SortField.Type.SCORE) at its position, pairing property entries with their
   PropertyDefinition via a separate index (also avoiding the OAK-4602
   IndexOutOfBoundsException), and runs the search with doDocScores=true when
   the sort contains a score field.
   
   Enabled by default and reversible at runtime via the FT_LEGACY_SORT_OAK-12399
   kill-switch feature toggle (wired through LuceneIndexProvider /
   LuceneIndexProviderService, mirroring FT_OAK-12146). Adds
   LuceneScoreWithPropertyOrderByTest.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to