[
https://issues.apache.org/jira/browse/LUCENE-1849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746926#action_12746926
]
Uwe Schindler commented on LUCENE-1849:
---------------------------------------
How about making acceptsDocsOutOfOrder() no abstract and provide a default
implementation that just returns a field that can only be set by a protected
method? E.g. protected setAcceptsDocsOutOfOrder() can be initialized by a
ctor? Or make the field private and initialize it by a ctor in the abstract
calss? By that cou can create a subclass of Collector like the following:
{code}
Collector c = new Collector(true/false) {
public void collect(...)...
...
}
{code}
I would like this, as it is much simplier to use instead of always implementing
this silly one-liner.
> Add OutOfOrderCollector and InOrderCollector subclasses of Collector
> --------------------------------------------------------------------
>
> Key: LUCENE-1849
> URL: https://issues.apache.org/jira/browse/LUCENE-1849
> Project: Lucene - Java
> Issue Type: Wish
> Components: Search
> Affects Versions: 2.9
> Reporter: Tim Smith
> Priority: Minor
> Fix For: 2.9
>
>
> I find myself always having to implement these methods, and i always return a
> constant (depending on if the collector can handle out of order hits)
> would be nice for these two convenience abstract classes to exist that
> implemented acceptsDocsOutOfOrder() as final and returned the appropriate
> value
--
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: [email protected]
For additional commands, e-mail: [email protected]