lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eks Dev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1169) Search with Filter does not work!
Date Fri, 08 Feb 2008 10:09:08 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566971#action_12566971
] 

Eks Dev commented on LUCENE-1169:
---------------------------------

Thank you for fixing it in no time :) But...

I am getting confused with skipping iterators semantics,

is this requirement for the other DocIdSetIterators, of only for scorers (should be, I guess)?

iterator.skipTo(iterator.doc()) <=> iterator.next();// is this contract?

if that is the case,  we have another bug in OpenBitSetIterator (border condition)

//this is the code in javadoc, "official contract"
  boolean simulatedSkipTo(DocIdSetIterator i, int target) throws IOException {
    do {
      if (!i.next())
    return false;
    } while (target > i.doc());
    return true;
  }

  public void testOpenBitSetBorderCondition() throws IOException {
    OpenBitSet bs = new OpenBitSet();
    bs.set(0);
    DocIdSetIterator i = bs.iterator();

    i.skipTo(i.doc());
    assertEquals(0, i.doc()); //cool, moved to the first legal position

    assertFalse("End of Matcher", i.skipTo(i.doc())); //NOT OK according to the javadoc
  }

  public void testOpenBitSetBorderConditionSimulated() throws IOException {
    OpenBitSet bs = new OpenBitSet();
    bs.set(0);
    DocIdSetIterator i = bs.iterator();

    simulatedSkipTo(i, i.doc());
    assertEquals(0, i.doc()); //cool, moved to the first legal position

    assertFalse("End of Matcher", simulatedSkipTo(i, i.doc())); //OK according to the javadoc!!
  }


> Search with Filter does not work!
> ---------------------------------
>
>                 Key: LUCENE-1169
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1169
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>            Reporter: Eks Dev
>            Assignee: Michael Busch
>            Priority: Blocker
>         Attachments: lucene-1169.patch, TestFilteredSearch.java
>
>
> See attached JUnitTest, self-explanatory

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message