reugn opened a new pull request, #16881:
URL: https://github.com/apache/lucene/pull/16881

   `FieldOffsetStrategy.createOffsetsEnumsForAutomata` converted each term from 
UTF-8 to UTF-16 once per automaton, so a query with N multi-term clauses 
(fuzzy, wildcard, prefix, regexp) converted every term N times. This change 
moves the conversion out of the inner loop, so each term is converted once. 
Behavior is unchanged.
   
   The benefit shows up when weight matches is disabled (it's on by default) 
and the field uses term vectors, since the loop then walks all of the 
document's terms. With `ANALYSIS` offsets the loop only sees terms that already 
passed the matchers, so there is little to save.
   
   In a JMH benchmark that highlights 10 docs of 1,000 words with term vectors, 
the highlight call was about 16% faster with 16 fuzzy clauses (edit distance 1) 
and unchanged with one clause.


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

Reply via email to