lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Outar" <rou...@ideorlando.org>
Subject RE: deleting a document with a term
Date Thu, 15 May 2003 14:54:10 GMT
Print out the term query and check it for correctness. I store file paths in
the index and I use them to delete files from the index using term queries.

Thanks,

Rob


-----Original Message-----
From: D-Fuse [mailto:mr_dfuse@yahoo.com]
Sent: Thursday, May 15, 2003 10:47 AM
To: lucene-user@jakarta.apache.org
Subject: Re: deleting a document with a term


No exceptions, but there is an IndexWriter and a
Reader open at the same time on the same indices dir.
Isn't that possible? It would be rather expensive if I
need to create a Reader and a Writer per element that
needs to be reindexed.

--- Otis Gospodnetic <otis_gospodnetic@yahoo.com>
wrote:
> Date: Thu, 15 May 2003 07:39:04 -0700 (PDT)
> From: Otis Gospodnetic <otis_gospodnetic@yahoo.com>
> Subject: Re: deleting a document with a term
> To: Lucene Users List
> <lucene-user@jakarta.apache.org>
>
> Maybe you are catching and 'eating' an exception
> somewhere?
> Maybe you are not closing the index?
> Make a simple test case, and I bet you'll find your
> problem.
>
> Otis
>
> --- D-Fuse <mr_dfuse@yahoo.com> wrote:
> > Hey,
> > I succesfully made an index of the content of a
> database, the
> > document is constructed as following:
> >
> > Document doc = new Document();
> > doc.add(Field.Text("VOORNAAM", voornaam));
> > doc.add(Field.Text("FAMILIENAAM", familienaam));
> > doc.add(Field.UnIndexed("ID",
> Integer.toString(id)));
> > doc.add(Field.UnStored("FREETEXT", strfreetext));
> > indexWriter.addDocument(doc);
> >
> > Searching goes good, but when I try to delete a
> document as
> > following:
> >
> > Term term = new Term("ID", Integer.toString(id));
> > int numberDeleted = indexReader.delete(term);
> >
> > the document is never deleted, numberDeleted is
> always zero. I
> > checked the ID and it exists. I also tried
> deleting the document by
> > using the Field VOORNAAM since that is indexed,
> but that gives the
> > same problem.
> >
> > Am I doing something wrong?
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > The New Yahoo! Search - Faster. Easier. Bingo.
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> lucene-user-help@jakarta.apache.org
>


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
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


Mime
View raw message