romseygeek commented on PR #15436: URL: https://github.com/apache/lucene/pull/15436#issuecomment-3767444606
> I think maybe the answer here is to skip segment re-sorting if the Sort defined on the query is the same as the index sort? So this does indeed work, but is trivially defeated if there isn't an actual Sort defined on the index, and it is just naturally sorted due to the order in which data is added. Given the fixed overhead of segment sorting, I think having this as something that happens automatically isn't viable. However, the enormous speed-ups in the adversarial sort cases are still worth getting somehow. I'm going to try moving the segment sorting logic to a FilterIndexReader implementation. That way clients can use their own logic to detect adversarial sorts and wrap the IndexReader before passing it to an IndexSearcher. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
