lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Smith (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1849) Add OutOfOrderCollector and InOrderCollector subclasses of Collector
Date Mon, 24 Aug 2009 20:12:59 GMT

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

Tim Smith commented on LUCENE-1849:
-----------------------------------

bq. we force them to think a little bit and then do what's best for them

the more you force people to think, the more likely they will come to the wrong solution (in
my experience)

i love the power of the new Collector API, and i know how to take advantage of it to eek out
the utmost performance where it matters or is possible.  But with some cases, i just want
that AbstractCollector because it reduces my code complexity for subclasses and does everything
i need without me introducing duplicated code

Also, the AbstractCollector makes it much easier to create anonymous subclasses of Collector
(just one method to override) (i hate anonymous subclasses myself, but i see them used a lot
inside lucene). I know in 2.4 there were tons of anonymous HitCollectors 

> 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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message