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.

        Erik


On Mar 5, 2006, at 1:24 PM, Paul Elschot wrote:

Erik,

issues.apache.org is not available here at the moment.
This test passes:

  public void testBoolean() throws Exception {
    BooleanQuery bq = new BooleanQuery();
    Query query = new FilteredQuery(new MatchAllDocsQuery(),
        new SingleDocTestFilter(0));
    bq.add(query, BooleanClause.Occur.SHOULD);
    query = new FilteredQuery(new MatchAllDocsQuery(),
        new SingleDocTestFilter(1));
    bq.add(query, BooleanClause.Occur.SHOULD);
    Hits hits = searcher.search(bq);
    assertEquals(2, hits.length());
    System.out.println(hits.id(0));
    System.out.println(hits.id(1));
  }

Regards,
Paul Elschot

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


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

Reply via email to