lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Pagination with MultiSearcher
Date Mon, 16 Mar 2009 01:42:17 GMT
Basically, the FileSortedHitQueue is just a sorting mechanism you
implement yourself. But I can't help but think that there's an easier
way, although I'll have to admit I haven't used MultiSearcher enough
to offer much guidance..... That'll teach me to send something off
on Sunday that I don't really understand well enough....

Sorry 'bout that
Erick

On Sun, Mar 15, 2009 at 9:15 AM, Amin Mohammed-Coleman <aminmc@gmail.com>wrote:

> 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