[
https://issues.apache.org/jira/browse/LUCENE-5092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13907374#comment-13907374
]
Paul Elschot commented on LUCENE-5092:
--------------------------------------
Do you mean that the a java public definition in the core module for this gives
it a wide impact?
One could also subclass DocIdSet and Filter to avoid the type check on the DISI
in the join module, but that is not in the patch.
The reason to have DocBlocksIterator in core is to allow some filters that are
in core to provide it, otherwise it could be in the join module only. I tried
to think of way to confine this to the join module, but I did not find one.
A factory for this could be confined to the join module, but it would have to
iterate the set once to be able to look back.
DocBlocksIterator does not impose that the parent document is at the end or
the beginning of a document block, that could be a reason to have it in core.
advanceToJustBefore() is an additional method that is somehow the difference of
two existing ones:
advanceToJustBefore() followed by nextDoc() === advance()
So a Filter providing this is a normal Filter that can also do an "almost"
advance(). Is that an "abuse" of Filter?
> join: don't expect all filters to be FixedBitSet instances
> ----------------------------------------------------------
>
> Key: LUCENE-5092
> URL: https://issues.apache.org/jira/browse/LUCENE-5092
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/join
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
> Attachments: LUCENE-5092.patch
>
>
> The join module throws exceptions when the parents filter isn't a
> FixedBitSet. The reason is that the join module relies on prevSetBit to find
> the first child document given a parent ID.
> As suggested by Uwe and Paul Elschot on LUCENE-5081, we could fix it by
> exposing methods in the iterators to iterate backwards. When the join modules
> gets an iterator which isn't able to iterate backwards, it would just need to
> dump its content into another DocIdSet that supports backward iteration,
> FixedBitSet for example.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]