uschindler commented on PR #12135:
URL: https://github.com/apache/lucene/pull/12135#issuecomment-1425749651

   Actually my idea was to keep PrefixCodedTerms changes out of the game. It 
stays internal class an it will not be modified at all.
   
   We just need a `java.util.stream.Collector` (or similar, I'd prefer that as 
it is a [mutable 
reduction](https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html#Reduction))
 that produces a PrefixCodedTerms instance from a stream of BytesRef. Then you 
can feed in any bytesref container (array, collection with or without sorting 
and deduplication).
   
   Let me hack this together later.
   
   Another problem I see is the following: The current code uses 
IndexOrDocvaluesQuery. This creates both queries and there is the stupid part: 
We sort the terms and popuplate PrefixCodedTerms, although it might no even use 
the query at execution time at all. This is in my opinion the main issue, not 
the sorting alone.


-- 
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