lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ankit Murarka <>
Subject Check if Term present in Existing Index before Merging indexes from Directory.
Date Wed, 11 Sep 2013 12:40:15 GMT

Have a peculiar problem to deal with and I am sure there must be some 
way to handle it.

1. Indexes exist on the server for existing files.
2. Generating indexing is automated so files when generated will also 
lead to index generation.
3. I am merging the newly generated indexes and existing index.

/*Field of prime importance is fileName.*/

Now since merging is being done with /* writer.addIndexes(Directory name)*/

The same file if indexed again is being added in the indexes twice. So 
in Hit I am getting more than 1 entries for same file. No problem with 
the HIT..

Problem is with the same file being indexed two times during merging..

I need to ensure that when I merge indexes, if term say /*"File1"*/ is 
already present, the indexes should be updated instead of adding. This 
is supposed to happen during indexing process.

Kindly guide as to how it can be achieved.. Javadoc does not seem to 
help me.



Ankit Murarka

"What lies behind us and what lies before us are tiny matters compared with what lies within

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