There was a code snipplet in my mail, just fill in your code. I cannot do
everything for you. With some programming experience you should understand
what's going on:
> searcher.search(query, new HitCollector() {
> @Override public void collect(int docid, float score) {
> // do something with docid
> }
> });
Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]
> -----Original Message-----
> From: m.harig [mailto:[email protected]]
> Sent: Tuesday, June 30, 2009 2:52 PM
> To: [email protected]
> Subject: RE: Read large size index
>
>
> Thanks Uwe,
>
> can you please give me a code snippet , so that i can resolve
> my
> issue , please
>
>
>
> The correct way to iterate over all results is to use a custom
> HitCollector
> (Collector in 2.9) instance. The HitCollector's method collect(docid,
> score)
> is called for every hit. No need to allocate arrays then:
>
> e.g.:
> searcher.search(query, new HitCollector() {
> @Override public void collect(int docid, float score) {
> // do something with docid
> }
> });
>
> TopDocsCollector is used to get a relevance-sorted view on the top ranking
> hits. It is not for iterating over the whole results (in full text search,
> nobody would normally do this. E.g. Google does not allow you to go beyond
> page 100). If you want to display the top 10 results you can use
> TopDocCollector(10).
>
> Uwe
>
>
>
> --
> View this message in context: http://www.nabble.com/Read-large-size-index-
> tp24251993p24271288.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]