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 "Amit Jain (JIRA)" <ji...@apache.org> on 2015/01/23 06:38:35 UTC
[jira] [Comment Edited] (OAK-2438) Evaluate support for
must(must_not(x)) query with Lucene
[ https://issues.apache.org/jira/browse/OAK-2438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14288767#comment-14288767 ]
Amit Jain edited comment on OAK-2438 at 1/23/15 5:38 AM:
---------------------------------------------------------
The testcase exists {{org.apache.jackrabbit.core.query.FulltextQueryTest#testFulltextExcludeSQL}}
I also copied the test with slight modification and added in trunk with revision http://svn.apache.org/r1654117
The logic for OAK-2434 has been changed to support queries covered in the above test cases.
was (Author: amitjain):
The testcase exists {{org.apache.jackrabbit.core.query.FulltextQueryTest#testFulltextExcludeSQL}}
I also added a copied the test with slight modification and added in trunk in revision http://svn.apache.org/r1654117
The logic for OAK-2434 has been changed to support queries covered in the above test cases.
> 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)