You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "dVenkatNaveen (via GitHub)" <gi...@apache.org> on 2025/07/29 07:10:26 UTC

[I] Lucene 5.x to 9.12.1 Migration – Change in Search Result Ordering [lucene]

dVenkatNaveen opened a new issue, #15000:
URL: https://github.com/apache/lucene/issues/15000

   ### Description
   
   Hi Team,
    
   As part of the migration from Lucene 5.x to 9.12.1, we’ve encountered an issue with the ordering of search results. Specifically, when searching with the term 'e', the results returned in Lucene 9.x differ from those in 5.x.
    
   Lucene 5.x (Previous Order)
   
   0: 2255b Queen St E  
   1:  268 Lakeshore Rd E  
   2: 2225 Sheppard Ave E  
   3:  90 Eglinton Ave E  
   4: 461 Queen St E  
   5: 2255 Queen St E  
   6: 468 Queen St E  
   7: 160 Traders Blvd E  
   8: 1590 Matheson Blvd E  
   9:  55 Northfield Dr E  
    
   Lucene 9.x (Current Order)
   
   0: 206 Gerrard St E  
   1: 1 Adelaide St E  
   2: 20 Adelaide St E  
   3: 2255b Queen St E  
   4:  268 Lakeshore Rd E  
   5: 2225 Sheppard Ave E  
   6:  90 Eglinton Ave E  
   7: 461 Queen St E  
   8: 2255 Queen St E  
   9: 468 Queen St E  
    
   We would like to retain the previous ordering behavior from Lucene 5.x. Could you please advise on how to achieve this in Lucene 9.12.1?
    
   Thanks,
   Naveen
    
   
   ### Version and environment details
   
   _No response_


-- 
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: issues-unsubscribe@lucene.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [I] Lucene 5.x to 9.12.1 Migration – Change in Search Result Ordering [lucene]

Posted by "msokolov (via GitHub)" <gi...@apache.org>.
msokolov commented on issue #15000:
URL: https://github.com/apache/lucene/issues/15000#issuecomment-3137942060

   Searching for the term 'e' among documents that all have a single 'e' in them is going to result in a more or less random order, as you've observed. I would say the behavior is consistent across the two Lucene versions: ie the order is random in both.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [I] Lucene 5.x to 9.12.1 Migration – Change in Search Result Ordering [lucene]

Posted by "msokolov (via GitHub)" <gi...@apache.org>.
msokolov commented on issue #15000:
URL: https://github.com/apache/lucene/issues/15000#issuecomment-3141395938

   > Also is there a way i can get same score for both the version?
   
   no, fraid not


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [I] Lucene 5.x to 9.12.1 Migration – Change in Search Result Ordering [lucene]

Posted by "dVenkatNaveen (via GitHub)" <gi...@apache.org>.
dVenkatNaveen commented on issue #15000:
URL: https://github.com/apache/lucene/issues/15000#issuecomment-3138626263

   Thanks for the update @msokolov. I have another follow-up question.
   
   The following statement retrieves my top 20 (maxHits)search results based on score:
    
   ScoreDoc[] hits = collector.topDocs(startingRecord, maxHits).scoreDocs; 
   
   The above line gives different scores in different version because of that my top 20 records changes in 9.12.1 version compared to version 5.5.
   Please find the attached screenshot where its showing the my top 20 records with score for both the version of lucene.
    
   **In Lucene 9.12.1 score**
   <img width="940" height="575" alt="Image" src="https://github.com/user-attachments/assets/798aa52e-f40c-4550-9f8d-d65f4a7c6e9a" />
   
   **In Lucene 5.x score**
   
   <img width="940" height="533" alt="Image" src="https://github.com/user-attachments/assets/ffed932f-840e-4219-97bb-e0623a5d2a89" />
   
    
   PS: score is always same for a perticular version. For example in 5.5 for every run scores are same.
   
   Also is there a way i can get same score for both the version?


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Re: [I] Lucene 5.x to 9.12.1 Migration – Change in Search Result Ordering [lucene]

Posted by "msokolov (via GitHub)" <gi...@apache.org>.
msokolov closed issue #15000: Lucene 5.x to 9.12.1 Migration – Change in Search Result Ordering
URL: https://github.com/apache/lucene/issues/15000


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org