GitHub user jtibshirani opened a pull request:
https://github.com/apache/lucene-solr/pull/375
LUCENE-8287: Ensure that empty regex completion queries always returns no
results.
This ensures parity with the standard `RegexpQuery`, which returns no
results for an
empty regex. It also fixes the exception described in the ticket when an
empty regex
is provided to a context query, as we no longer try to match on an empty
prefix.
In addition to the fix, I added tests that check the behavior of an empty
`RegexpQuery` and `PrefixCompletionQuery`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jtibshirani/lucene-solr
bugfix/regex-completion-query
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/375.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #375
commit 88cbbb7b4e3a5eddc0482120f271c327f9362746
Author: Julie Tibshirani
Date: 2018-05-09T06:10:09Z
LUCENE-8287: Ensure that empty regex completion queries always return no
results.
This ensures parity with the standard RegexpQuery, which returns no results
for an
empty regex. It also fixes the exception described in the ticket when an
empty regex
is provided to a context query, as we no longer try to match on an empty
prefix.
---
-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org