lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronald Wildenberg" <r.wildenb...@kennisnet.org>
Subject Index not recreated
Date Mon, 14 Aug 2006 13:42:25 GMT
Hi,
 
I'm experiencing the problem that my index does not seem to be
recreated, despite using the correct flags. The result is that documents
that represent equal database rows occur multiple times in the index. I
recreate my entire index each night.
 
My IndexDirectory/IndexWriter construction code looks like this:
 
   File indexDirectory = new File(indexPath);
   FSDirectory luceneIndexDirectory =
FSDirectory.getDirectory(indexDirectory, true);
   IndexWriter indexWriter = new IndexWriter(luceneIndexDirectory,
analyzer, true);

This code should take care of recreating my index, but it does not seem
to be working properly. It looks like the old index is not removed and
the same documents are added to my index again.
 
I have strong reasons to not suspect other code to add duplicate
documents. First, if no index has yet been created, no duplicate
documents are added. Second, if an old index does exist, after
recreating the index all documents exist exactly twice (and the
following night they exist three times, etc.). It is not the case that
some documents are duplicated.
 
Does anyone have any ideas?
 
Thanks in advance,
Ronald.


DISCLAIMER:

Dit bericht (met bijlagen) is met grote zorgvuldigheid samengesteld. Voor mogelijke onjuistheid
en/of onvolledigheid van de hierin verstrekte informatie kan Kennisnet geen aansprakelijkheid
aanvaarden, evenmin kunnen aan de inhoud van dit bericht (met bijlagen) rechten worden ontleend.
De inhoud van dit bericht (met bijlagen) kan vertrouwelijke informatie bevatten en is uitsluitend
bestemd voor de geadresseerde van dit bericht. Indien u niet de beoogde ontvanger van dit
bericht bent, verzoekt Kennisnet u dit bericht te verwijderen, eventuele bijlagen niet te
openen en wijst Kennisnet u op de onrechtmatigheid van het gebruiken, kopiŽren of verspreiden
van de inhoud van dit bericht (met bijlagen).

This message (with attachments) is given in good faith. Kennisnet cannot assume any responsibility
for the accuracy or reliability of the information contained in this message (with attachments),
nor shall the information be construed as constituting any obligation on the part of Kennisnet.
The information contained in this message (with attachments) may be confidential or privileged
and is only intended for the use of the named addressee. If you are not the intended recipient,
you are requested by Kennisnet to delete this message (with attachments) without opening it
and you are notified by Kennisnet that any disclosure, copying or distribution of the information
contained in this message (with attachments) is strictly prohibited and unlawful.


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