You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2006/06/10 22:59:30 UTC
[jira] Resolved: (LUCENE-597) Strange results
[ http://issues.apache.org/jira/browse/LUCENE-597?page=all ]
Hoss Man resolved LUCENE-597:
-----------------------------
Resolution: Invalid
your second example is not equivilent to your first -- specificically the second example is not actually a valid query, because bsubq2 is not a valid query (a BooleanQuery must contain at least one non-prohibited clause ... queries must positively select something)
In the future, when you have questions about how/why something works (or seems to not work) the way it does -- please start by emailing the Lucene Java Users mailing list, and only open after some discussion amongst other users.
> Strange results
> ---------------
>
> Key: LUCENE-597
> URL: http://issues.apache.org/jira/browse/LUCENE-597
> Project: Lucene - Java
> Type: Test
> Versions: 2.0.0
> Environment: jdk 5
> Reporter: rcolmegna
>
> I noted that these queris give different results. But they are the same logical query (or I'm in error?) !
> -------------------- 1---------------------------- (5 results)
> BooleanQuery query = new BooleanQuery();
> WildcardQuery subq1 = new WildcardQuery(new Term("dest","test*"));
> WildcardQuery subq2 = new WildcardQuery(new Term("dest","try*"));
> BooleanQuery bsubq2 = new BooleanQuery();
> WildcardQuery subq3 = new WildcardQuery(new Term("dest","12345*"));
> query.add(subq1, BooleanClause.Occur.MUST);
> query.add(subq2, BooleanClause.Occur.MUST);
> bsubq2.add(subq3, BooleanClause.Occur.MUST);
> query.add(bsubq2, BooleanClause.Occur.MUST_NOT);
> -------------------- 2---------------------------- (no results)
> BooleanQuery query = new BooleanQuery();
> WildcardQuery subq1 = new WildcardQuery(new Term("dest","test*"));
> WildcardQuery subq2 = new WildcardQuery(new Term("dest","try*"));
> BooleanQuery bsubq2 = new BooleanQuery();
> WildcardQuery subq3 = new WildcardQuery(new Term("dest","12345*"));
> query.add(subq1, BooleanClause.Occur.MUST);
> query.add(subq2, BooleanClause.Occur.MUST);
> bsubq2.add(subq3, BooleanClause.Occur.MUST_NOT); // difference against 1st query
> query.add(bsubq2, BooleanClause.Occur.MUST); // difference against 1st query
> Any suggests?
> TIA
> Roberto Colmegna
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org