cutting     2003/07/11 15:13:13

  Modified:    .        CHANGES.txt
               src/java/org/apache/lucene/index IndexWriter.java
  Log:
  Added method IndexWriter.addDocument(Document, Analyzer).
  
  Revision  Changes    Path
  1.49      +5 -1      jakarta-lucene/CHANGES.txt
  
  Index: CHANGES.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/CHANGES.txt,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- CHANGES.txt       1 May 2003 19:50:17 -0000       1.48
  +++ CHANGES.txt       11 Jul 2003 22:13:12 -0000      1.49
  @@ -12,6 +12,10 @@
       permitted to write files.  This way folks can open and correctly
       lock indexes which are read-only to them.
   
  + 3. IndexWriter: added a new method, addDocument(Document, Analyzer),
  +    permitting one to easily use different analyzers for different
  +    documents in the same index.
  +
   
   1.3 RC1
   
  
  
  
  1.13      +10 -0     jakarta-lucene/src/java/org/apache/lucene/index/IndexWriter.java
  
  Index: IndexWriter.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/IndexWriter.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- IndexWriter.java  9 Apr 2003 02:27:36 -0000       1.12
  +++ IndexWriter.java  11 Jul 2003 22:13:13 -0000      1.13
  @@ -212,6 +212,16 @@
      * discarded.
      */
     public void addDocument(Document doc) throws IOException {
  +    addDocument(doc, analyzer);
  +  }
  +
  +  /**
  +   * Adds a document to this index, using the provided analyzer instead of the
  +   * value of [EMAIL PROTECTED] #getAnalyzer()}.  If the document contains more than
  +   * [EMAIL PROTECTED] #maxFieldLength} terms for a given field, the remainder are
  +   * discarded.
  +   */
  +  public void addDocument(Document doc, Analyzer analyzer) throws IOException {
       DocumentWriter dw =
         new DocumentWriter(ramDirectory, analyzer, similarity, maxFieldLength);
       String segmentName = newSegmentName();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to