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: IndexReader deleteDocument
Date Fri, 14 Mar 2008 14:58:40 GMT
Doc IDs are assigned at index time and can change over time That is,
deleting
a document and optimizing (and other operations) can and will change
document IDs. So, yes, you have to do a search (either use a hits object
or one of the HitCollectors) in order to delete by doc ID.

You can also delete by terms, see the API.

There are other options, but you haven't explianed what you're
trying to accomplish enough to offer any more suggestions.

Best
Erick

On Wed, Mar 12, 2008 at 5:44 PM, varun sood <vsood2@gmail.com> wrote:

> No. I haven't but I will. even though I would like to make my own
> implementation. So any idea of how to get the "doc num"?
>
> Thanks for replying.
> Varun
>
> On Wed, Mar 12, 2008 at 5:15 PM, Mark Miller <markrmiller@gmail.com>
> wrote:
>
> > Have you seen the work that Mark Harwood has done making a GWT version
> > of Luke? I think its in the latest release.
> >
> > varun sood wrote:
> > > Hi,
> > >   I am trying to delete a document without using the hits object.
> > > What is the unique field in the index that I can use to delete the
> > document?
> > >
> > > I am trying to make a web interface where index can be modified,
> smaller
> > > subset of what Luke does but using JSPs and Servlet.
> > >
> > > to use deleteDocument(int docNum)
> > > I need docNum how can I get this? or does it have to come only vis
> Hits?
> > >
> > > Thanks,
> > > Varun
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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