lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karel Tejnora <ka...@tejnora.cz>
Subject Re: updating document
Date Thu, 10 Aug 2006 22:46:06 GMT
Hi,
    I'm facing similar problem. I found a possible way, how to copy a 
part of index (w/o copy whole index,delete,optimize), but don't know how 
to change/add/remove field (or add term vector in my case) to existing 
index.

To copy a part of index override methods in IndexReader

  /** Returns true if document <i>n</i> has been deleted */
  public abstract boolean isDeleted(int n);

  /** Returns true if any documents have been deleted */
  public abstract boolean hasDeletions();

and use addIndexes when it has a just one segment.
I have not tested it yet, just an idea from reading source code.

Karel



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message