dviner      2003/08/04 17:02:46

  Modified:    java/src/org/apache/xindice/core Collection.java
  Log:
  Ok, now the non-inline metadata will be updated for document insertion.  
Previously the updateDocumentMeta call was only made when setDocument() was 
invoked.  In order to prevent such oversights again, I've moved the call to 
updateDocumentMeta() into putDocument().  This means it will be called from 
when any new document is inserted.  If a call is made to "putBinary", the 
non-inline document metadata is not updated.
  
  --dviner
  
  Revision  Changes    Path
  1.25      +4 -4      
xml-xindice/java/src/org/apache/xindice/core/Collection.java
  
  Index: Collection.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/Collection.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Collection.java   1 Aug 2003 19:40:17 -0000       1.24
  +++ Collection.java   5 Aug 2003 00:02:45 -0000       1.25
  @@ -1099,7 +1099,7 @@
   
       /**
        * This is the lowest-level method for storing a record into the backing 
store.
  -     * It does not update non-inline metadata.
  +     * It now does update non-inline metadata if the user has configured it.
        */
       private void putDocument(Key key, Document document) throws DBException {
   
  @@ -1196,6 +1196,8 @@
                   documentCache.putDocument(this, key, document);
           }
   
  +        // update the meta for this document
  +        updateDocumentMeta(key.toString());
           DBObserver.getInstance().putDocument(this, key, document, oldDoc == 
null);
       }
   
  @@ -1428,8 +1430,6 @@
       public final void setDocument(Object docKey, Document document) throws 
DBException {
           putDocument(createNewKey(docKey), document /*, false */
           );
  -        // update the meta for this document
  -        updateDocumentMeta(docKey.toString());
       }
   
       /**
  
  
  

Reply via email to