You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Niraj Alok <ni...@emacmillan.com> on 2004/06/29 13:11:18 UTC
hits remove
Hi All,
Is it possible to remove a document from the hits object once it has been
used and displayed to the user?
Regards,
Niraj
Re: hits remove
Posted by Otis Gospodnetic <ot...@yahoo.com>.
No, Hits exposes a read-only API.
(I looked at
http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/Hits.html)
You could easily implement this in your API by remembering doc Ids that
you looped through, and displaying a doc only if its Id has not already
been seen.
Otis
--- Niraj Alok <ni...@emacmillan.com> wrote:
> No, remove from the list of matching documents itself. Once I have
> used one
> of the hits.doc, I want that doc itself to be removed from hits so
> that when
> I do hits.doc again for the same hit number, it should return me
> null.
>
> Is it possible?
>
> Regards,
> Niraj
> ----- Original Message -----
> From: "Erik Hatcher" <er...@ehatchersolutions.com>
> To: "Lucene Users List" <lu...@jakarta.apache.org>
> Sent: Tuesday, June 29, 2004 5:02 PM
> Subject: Re: hits remove
>
>
> > On Jun 29, 2004, at 4:11 AM, Niraj Alok wrote:
> > > Is it possible to remove a document from the hits object once it
> has
> > > been
> > > used and displayed to the user?
> >
> > Not currently. By "remove" I presume you only mean remove from the
> > internal cache, but not remove it from the list of matching
> documents,
> > right?
> >
> > Erik
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> lucene-user-help@jakarta.apache.org
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: hits remove
Posted by Niraj Alok <ni...@emacmillan.com>.
No, remove from the list of matching documents itself. Once I have used one
of the hits.doc, I want that doc itself to be removed from hits so that when
I do hits.doc again for the same hit number, it should return me null.
Is it possible?
Regards,
Niraj
----- Original Message -----
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Tuesday, June 29, 2004 5:02 PM
Subject: Re: hits remove
> On Jun 29, 2004, at 4:11 AM, Niraj Alok wrote:
> > Is it possible to remove a document from the hits object once it has
> > been
> > used and displayed to the user?
>
> Not currently. By "remove" I presume you only mean remove from the
> internal cache, but not remove it from the list of matching documents,
> right?
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
Re: hits remove
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jun 29, 2004, at 4:11 AM, Niraj Alok wrote:
> Is it possible to remove a document from the hits object once it has
> been
> used and displayed to the user?
Not currently. By "remove" I presume you only mean remove from the
internal cache, but not remove it from the list of matching documents,
right?
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org