HoustonPutman commented on PR #14775:
URL: https://github.com/apache/lucene/pull/14775#issuecomment-2970940354

   > I wonder if there's a better way of doing this, maybe something like 
adding support for `searchBefore`, which would do the opposite of `searchAfter` 
(I'm thinking out loud, I having given much thoughts to this).
   
   I would be all for this, but it seemed like a harder/more intrusive change.
   
   > It doesn't seem to handle ties correctly, you probably need to append a 
SortField that sorts by descending doc ID, since Lucene tie-breaks by ascending 
doc ID by default. But then it's a bit annoying that the inverse Sort object 
produces different sort values compared with the original Sort object?
   
   That's fair, it wasn't something I was considering since in our use case, 
the uniqueId must be a part of the sort. (No ties)
   
   > The handling of missing values probably needs changing, inversing a 
SortField on a String field that it configured to sort missing values last 
should probably sort missing values first and vice-versa?
   
   Again, fair. In my mind, Lucene only had a "missing value" not a "sort 
missing last" option, like Solr does. But you are right, there would be no way 
to fix that when using this `inverse()` method.
   
   Thanks for the feedback, I think it'll probably be best to do this in the 
Application, as you mentioned. (Or have a searchBefore() option, which would be 
great!)
   


-- 
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-unsubscr...@lucene.apache.org

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


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

Reply via email to