lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jtibshirani <>
Subject [GitHub] lucene-solr issue #375: LUCENE-8287: Ensure that empty regex completion quer...
Date Wed, 16 May 2018 21:10:20 GMT
Github user jtibshirani commented on the issue:
    I'm sorry for the confusion -- I didn't mean complete parity with `RegexpQuery`, as they
are different queries with different behaviors, but rather consistency how they treat an empty
regex. After thinking more I now see your point, it makes a lot more sense to describe it
as consistency with `PrefixCompletionQuery`!
    I've made the following changes:
    - Replaced references to 'parity with `RegexpQuery`' to 'consistency with `PrefixCompletionQuery`,
as this is more accurate.
    - Added an optimization to `ContextQuery#createWeight` that returns an empty automaton
if the inner weight is empty. Note that this optimization only helps with `RegexCompletionQuery`.
When `PrefixCompletionQuery` contains an empty term, its automaton is actually `*` -- maybe
we could look into adding an optimization there in a follow-up.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message