lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amin Mohammed-Coleman <ami...@gmail.com>
Subject Re: Pagination with MultiSearcher
Date Sun, 15 Mar 2009 13:15:10 GMT
HI Erick
Thanks for your reply, glad to see I'm not the only person
working/developing on a Sunday!  I'm not sure how the FieldSortedHitQueue
works and how it can be applied to the search method exposed by
MultiSearcher.  Would it be possible to clarify abit more or even point to
some reference documentation?

Cheers
Amin

On Sun, Mar 15, 2009 at 1:08 PM, Erick Erickson <erickerickson@gmail.com>wrote:

> You could do something with FieldSortedHitQueue as a post-search
> sort, but I wonder if this would work for you...
>
> public TopFieldDocs
> <
> http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/TopFieldDocs.html
> >
> *search*(Query <
> http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/Query.html
> >
> query,
>                           Filter
> <
> http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/Filter.html
> >
> filter,
>                           int n,
>                           Sort
> <
> http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/Sort.html
> >
> sort)
>                    throws IOException
> <http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html>
>
>
> Best
> Erick
>
>
> On Sun, Mar 15, 2009 at 2:12 AM, Amin Mohammed-Coleman <aminmc@gmail.com
> >wrote:
>
> > Hi
> >
> > I'm looking at trying to implement pagination for my search project. I've
> > been google-ing for a solution. So far no luck. I've seen implementations
> of
> > HitCollector which looks promising, however my search method has to
> > completely change.
> >
> > For example I'm currently using the following:
> >
> > search ( query, filter,int, sort)
> >
> > If I use a HitCollector there isn't a search to apply
> > query,hitcollector,sort and filter, unless I'm supposed to apply sort and
> > filter in the hit collector.
> >
> > I would be grateul if anyone could advise me what approach to take.
> >
> > One a side note I just want to thank you all for helping me with many of
> my
> > issues. I'm hoping this is my last question!  Thanks for your patience!
> >
> >
> > Cheers
> >
> > Amin
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message