lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julie Tibshirani (JIRA)" <>
Subject [jira] [Updated] (LUCENE-8287) ContextQuery with empty RegexCompletionQuery produces an assertion failure
Date Mon, 07 May 2018 17:25:00 GMT


Julie Tibshirani updated LUCENE-8287:
    Attachment: LUCENE-8287.patch

> ContextQuery with empty RegexCompletionQuery produces an assertion failure
> --------------------------------------------------------------------------
>                 Key: LUCENE-8287
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Julie Tibshirani
>            Priority: Major
>         Attachments: LUCENE-8287-repro.patch, LUCENE-8287.patch
> When an empty RegexCompletionQuery is provided to ContextQuery, the following assertion
failure occurs:
> {code:java}
> java.lang.AssertionError: input should not end with the context separator
> at$ContextCompletionWeight.setInnerWeight(
> at$ContextCompletionWeight.setNextMatch(
> at
> at
> at
> at
> at
> at
> {code}
> This is a bit of an edge case, but may be concerning since without assertions enabled,
you can go on to access IntsRef indices that are out of bounds.
> The attached patch provides a reproduction of the issue, as the test case TestContextQuery#testEmptyRegexQuery.
Note that to reproduce, Java assertions must be enabled (as in the default configuration for
> The patch also provides a test case for the normal behavior of an empty RegexCompletionQuery,
when it is not wrapped in ContextQuery (TestRegexCompletionQuery#testEmptyRegexQuery). In
this case, there is no error, and all suggestions are returned. 

This message was sent by Atlassian JIRA

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

View raw message