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

Hoss Man commented on LUCENE-1290:
----------------------------------


FYI: when applying the patch, i got two failed hunks in 
src/test/org/apache/lucene/search/TestCustomSearcherSort.java -- but i didn't 
dig into why, possibly due to eol-style not being set on the files or perhaps 
because of tabs (see below)

The only files I looked at closely where the Hits class, the demo code, and the 
docs...

We should probably make the deprecation of Hits more obvious in it's class 
level javadocs ... i would even go so far as to suggest including sample code 
showing the difference for people who are use to using hits.

The new SearchFiles.java demo app seems straight forward and easy to 
understand, although we should probably add some more javadocs to 
doPagingSearch and doStreamingSearch to explain what we mean by those concepts. 
 The new code in both of these methods (ie: lines using HitCollector and 
TopDocCollector) seem to be indented with tabs and not space characters ... so 
that should be normalized (i didn't check other files modified by the patch to 
see if they were likewise affected)

The changes to demo2.xml seem straight forward enough ... although I notice 
Hits is still referenced in scoring.xml so that should be changed also.



> 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
>
>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to