You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2015/01/22 13:48:34 UTC
[jira] [Created] (OAK-2438) Evaluate support for must(must_not(x))
query with Lucene
Chetan Mehrotra created OAK-2438:
------------------------------------
Summary: Evaluate support for must(must_not(x)) query with Lucene
Key: OAK-2438
URL: https://issues.apache.org/jira/browse/OAK-2438
Project: Jackrabbit Oak
Issue Type: Task
Components: oak-lucene
Reporter: Chetan Mehrotra
Assignee: Chetan Mehrotra
Priority: Minor
Fix For: 1.1.6
As part of OAK-2434 fix we are changing following logic
{code:java}
@Override
public boolean visit(FullTextAnd and) {
BooleanQuery q = new BooleanQuery();
for (FullTextExpression e : and.list) {
Query x = getFullTextQuery(e, analyzer, reader);
// Lucene can't deal with "must(must_not(x))"
if (x instanceof BooleanQuery) {
BooleanQuery bq = (BooleanQuery) x;
for (BooleanClause c : bq.clauses()) {
q.add(c);
}
} else {
q.add(x, MUST);
}
}
result.set(q);
return true;
}
{code}
With a logic where the query is always added to BooleanQuery without unwrapping. This might affect logic related to comment _// Lucene can't deal with "must(must_not(x))"_. Currently there is no testcase to check that condition and we are not sure how this change would affect such a check.
So need to add a testcase to document the behaviour for such cases
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)