Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial matches in DisjunctionIntervalQueries trip assertions when collected [LUCENE-4555] #5621

Closed
asfimport opened this issue Nov 12, 2012 · 4 comments

Comments

@asfimport
Copy link

asfimport commented Nov 12, 2012

See, eg, all the TestOr* tests in TestBasicIntervals.


Migrated from LUCENE-4555 by Alan Woodward (@romseygeek), resolved Nov 20 2012
Parent: #3952

@asfimport
Copy link
Author

Alan Woodward (@romseygeek) (migrated from JIRA)

The TestOr* queries failing were due to bugs in the tests, of course...

The actual problem here is that DisjunctionIntervalIterator doesn't take snapshots of its intervals, so the iterator is already positioned when we collect. I'll abstract out a SnapshotCollectingIntervalIterator, and both ConjunctionII and DisjunctionII can subclass from that.

@asfimport
Copy link
Author

Alan Woodward (@romseygeek) (migrated from JIRA)

OK, the relevant test here is TestNestedIntervalFilterQueries.testOrNearNearQuery. It seems as though the bug is actually in PositionFilterScorer (which should be called IntervalFilterScorer, but anyway). Will try and chase it down tonight.

@asfimport
Copy link
Author

Alan Woodward (@romseygeek) (migrated from JIRA)

I'm running into something of a brick wall here.

The problem arises when you have a DisjunctionII wrapping an IntervalFilter over a ConjunctionII. When scorerAdvanced is called, a ConjunctionII can end up positioned on a document ahead of the parent DisjunctionII, which then trips asserts when the parent is advanced. I've tried to work out a way round this but am failing so far. Anybody else want to have a look?

@asfimport
Copy link
Author

Alan Woodward (@romseygeek) (migrated from JIRA)

Got it, fixed in 1411603

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant