[
https://issues.apache.org/jira/browse/LUCENE-3450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113376#comment-13113376
]
Karl Wright commented on LUCENE-3450:
-------------------------------------
bq. From your example patch, i see only MUST_NOT clauses. This cannot work.
I agree that the first clause must have a MatchAllQuery added, but that's not
the failure I'm looking at. The case in question involves the SECOND clause:
{code}
// Extend the query appropriately for each user access token.
- bf.add(new
FilterClause(calculateCompleteSubfilter(fieldAllowShare,fieldDenyShare,userAccessTokens),BooleanClause.Occur.MUST));
- bf.add(new
FilterClause(calculateCompleteSubfilter(fieldAllowDocument,fieldDenyDocument,userAccessTokens),BooleanClause.Occur.MUST));
+
bq.add(calculateCompleteSubquery(fieldAllowShare,fieldDenyShare,userAccessTokens),BooleanClause.Occur.MUST);
+
bq.add(calculateCompleteSubquery(fieldAllowDocument,fieldDenyDocument,userAccessTokens),BooleanClause.Occur.MUST);
{code}
The first clause is used only when a user has no tokens, which has a test but
is not the one I've singled out.
The actual query being generated in this case is:
{code}
[junit] +((-allow_token_share:* -deny_token_share:*)
allow_token_share:token1 -deny_token_share:token1) +((-allow_token_document:*
-deny_token_document:*) allow_token_document:token1 -deny_token_document:token1)
{code}
Does this look like it is constructed incorrectly to you?
> BooleanQuery seems broken on trunk
> ----------------------------------
>
> Key: LUCENE-3450
> URL: https://issues.apache.org/jira/browse/LUCENE-3450
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Karl Wright
> Attachments: filter.diff, query.diff
>
>
> Converting a Solr SearchComponent from using filters to using equivalent
> queries causes its test cases to fail. The reasons are unclear, and I've
> tried several things to isolate the problem, but with no luck so far.
> The failure manifests itself by the constructed query returning no documents
> whatsoever, at least within the Solr context it's being used in. The
> equivalent filter version of the component works properly (as you can see by
> the passed test).
> To run the test:
> cd solr/contrib/mcf
> ant test
> I will attach both filter and query versions of the code, as patches.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]