Paul,

I owe you a big apology for the hassle it appears. I have been running from my IDE (IntelliJ) and that test was failing, and I had gone and cleaned up lots of modified Lucene source files from previous uncommitted patches and ensured my environment was only this one change. I had not run it from Ant but just tried it after seeing your reference to it. All passed. And so I did a clean build from my development environment and the test now passes. I really apologize - I've never had things get out of sync like that especially after confirming it several times before posting my issue.

So it appears all is well with that patch. For reference, it is the inlined patch in my comments to LUCENE-330.

I'll commit in a day or so unless there are objections. The rest of LUCENE-330 would still be up for discussion, I haven't tried those nor in a position knowledgeable enough to comment on them.

Thank you so much for your contribution(s!) to Lucene, Paul, and also with your enduring patience especially with patches that tend to sit unapplied for far longer than they should.

        Erik


On Mar 6, 2006, at 3:04 PM, Paul Elschot wrote:

Erik,

With the FilteredQuery that you provided
and with only the two printing lines removed:

===================================================================
--- TestFilteredQuery.java      (revision 383350)
+++ TestFilteredQuery.java      (working copy)
@@ -136,8 +136,6 @@
         new SingleDocTestFilter(1));
     bq.add(query, BooleanClause.Occur.MUST);
     Hits hits = searcher.search(bq);
-    System.out.println(hits.id(0));
-    System.out.println(hits.id(1));
     assertEquals(0, hits.length());
   }
 }

ant -Dtestcase=TestFilteredQuery

passes here.

With this diff:
===================================================================
--- TestFilteredQuery.java      (revision 383350)
+++ TestFilteredQuery.java      (working copy)
@@ -131,14 +131,12 @@
     BooleanQuery bq = new BooleanQuery();
     Query query = new FilteredQuery(new MatchAllDocsQuery(),
         new SingleDocTestFilter(0));
-    bq.add(query, BooleanClause.Occur.MUST);
+    bq.add(query, BooleanClause.Occur.SHOULD);
     query = new FilteredQuery(new MatchAllDocsQuery(),
         new SingleDocTestFilter(1));
-    bq.add(query, BooleanClause.Occur.MUST);
+    bq.add(query, BooleanClause.Occur.SHOULD);
     Hits hits = searcher.search(bq);
-    System.out.println(hits.id(0));
-    System.out.println(hits.id(1));
-    assertEquals(0, hits.length());
+    assertEquals(2, hits.length());
   }
 }

the test also passes.

Regards,
Paul Elschot


On Monday 06 March 2006 19:05, you wrote:
On Sunday 05 March 2006 23:51, Erik Hatcher wrote:

On Mar 5, 2006, at 5:41 PM, Erik Hatcher wrote:
Yes, the SHOULD clauses do pass with an expected and actual result
of 2 documents.  However, changing both to MUST expects 0 documents
yet the actual number is 2.

To clarify, the actual number of 2 documents with both clauses a MUST
is with the trunk codebase.

With the patch from the JIRA issue, an
exception occurs.

I tried the FilteredQuery.java patch you posted at the jira issue
but I cannot get it applied, it fails for both hunks.
Could you post your version of FilteredQuery.java?

Regards,
Paul Elschot



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to