lucene-dev mailing list archives

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

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

Paul Elschot commented on LUCENE-1169:
--------------------------------------

Some of the bugs caused by this skipTo() behaviour are hard to catch:
http://issues.apache.org/bugzilla/show_bug.cgi?id=35823

Basically the fix was to guard every invocation of skipTo() with a target > doc()
test when no advancing should be done.

In the above case I still don't know what the exact cause was, as the last patch
added this guarding test in more than one place.

One way to 'fix' this is by adding to the javadoc of skipTo() that the behaviour is
undefined when target <= doc(), and otherwise the behaviour is the old behaviour.
Implementations should then define the behaviour when target <= doc().
This has the advantage that the only way to fix it is by reviewing all the
skipTo(targetDocId) code when the javadoc does not completely define the behaviour
of an implementation.

Another way to go about this is to consider target<=doc() on entry of skipTo a bug,
and add sth like this:
assert (notInitialized and (target >= 0) or (target > doc());
at the entry of each skipTo implementation in the trunk and fix the bugs as they show up.

For the moment I prefer the latter, it is a bit drastic, but it gets rid of a lot of uncertainty.
Anyway, when taking it that far, it's another issue.




> 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