lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Busch (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1290) Deprecate Hits
Date Wed, 21 May 2008 09:09:55 GMT

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

Michael Busch commented on LUCENE-1290:
---------------------------------------

Of course I don't want to remove something that adds real value to Lucene. IMO, Hits does
not. It is a class whose APIs we always discourage to use. Such a class does not belong in
the core. The HitCollector (especially TopDocCollector) APIs are similar to use and offer
more control, flexibility and insight.

So I think we should deprecate Hits (it will still be part then of 2.4 and 2.9 and removed
in 3.0). In the meantime, if people really think that there should be a replacement for Hits
in the future, we can develop a new helper class in contib that doesn't have the drawbacks
that Hits has, and contributors like Uwe and Christian are very welcome to submit patches
for that!

However, I don't want to make a decision here that is in conflict with opinions of others,
so maybe it might be a good idea to call a vote on java-dev about this issue?

> Deprecate Hits
> --------------
>
>                 Key: LUCENE-1290
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1290
>             Project: Lucene - Java
>          Issue Type: Task
>          Components: Search
>            Reporter: Michael Busch
>            Assignee: Michael Busch
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: lucene-1290.patch, lucene-1290.patch
>
>
> The Hits class has several drawbacks as pointed out in LUCENE-954.
> The other search APIs that use TopDocCollector and TopDocs should be used instead.
> This patch:
> - deprecates org/apache/lucene/search/Hits, Hit, and HitIterator, as well as
>   the Searcher.search( * ) methods which return a Hits Object.
> - removes all references to Hits from the core and uses TopDocs and ScoreDoc
>   instead
> - Changes the demo SearchFiles: adds the two modes 'paging search' and 'streaming search',
>   each of which demonstrating a different way of using the search APIs. The former
>   uses TopDocs and a TopDocCollector, the latter a custom HitCollector implementation.
> - Updates the online tutorial that descibes the demo.
> All tests pass.

-- 
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