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: TermQuery search returns the same Document several times
Date Thu, 05 Feb 2009 22:37:59 GMT
Your coworker *might* have been talking about a Hits object when
iterating over it for documents past the 100th or so. See the
discussion list of the wiki for the messy details.

Well, you can always sort by a field rather than by score, see
SortField and associated. And you can always specify secondary
and tertiary... sorts.

I'll leave it to others for other suggestions since I'm in a rush.

Best
Erick

On Thu, Feb 5, 2009 at 8:44 AM, Lebiram <lebiram@ymail.com> wrote:

>
> Sorry, I might have misunderstood what my coworker told me.
>
> If HitCollector only returns a document once then he might be referring to
> an application ID that is assigned to a field that has been indexed twice or
> more with different document IDs.
>
> I'll clarify this with him.
>
> However is there a way to somehow do a group by field on the results? That
> field being the application ID?
>
> Thanks.
>
>
>
>
> ________________________________
> From: Erick Erickson <erickerickson@gmail.com>
> To: java-user@lucene.apache.org
> Sent: Thursday, February 5, 2009 1:16:12 PM
> Subject: Re: TermQuery search returns the same Document several times
>
> I don't understand your question. From the API docs for
> HitCollector.collect:
>
> <<<Called once for every non-zero scoring document, with
> the document number and its score.>>>
>
> Can you ask your question another way? Because the
> only answer I can come up with is
> "HitCollector.collect only sees each document once by definition".
>
> Best
> Erick
>
> On Thu, Feb 5, 2009 at 7:17 AM, Lebiram <lebiram@ymail.com> wrote:
>
> > Hi All,
> >
> > Is it possible to somehow ensure that a document will be returned only
> once
> > when collecting from HitCollector?
> >
> >
> >
>
>
>
>
>

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