lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Turcotte" <pat...@gmail.com>
Subject Re: confused about an entry in the FAQ
Date Sat, 10 May 2008 18:05:12 GMT
Did you try the IndexSearcher.doc(int i, FieldSelector fieldSelector)  method?

Could be faster because Lucene don't have do "prepare" the whole document.

Patrick

On Sat, May 10, 2008 at 9:35 AM, Stephane Nicoll
<stephane.nicoll@gmail.com> wrote:
> From the FAQ:
>
> "Don't iterate over more hits than needed.
> Iterating over all hits is slow for two reasons. Firstly, the search()
> method that returns a Hits object re-executes the search internally
> when you need more than 100 hits. Solution: use the search method that
> takes a HitCollector instead."
>
> I had a look to HitCollector but it returns the documentId and the
> javadoc recommends not fetching the original query there.
>
> I have to return *one* indexed field from the query result and
> currently I am iterating on all results and it's slow. Can you explain
> a bit more how I could improve this?
>
> Thanks,
> St├ęphane
>
>
> --
> Large Systems Suck: This rule is 100% transitive. If you build one,
> you suck" -- S.Yegge
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message