Update of /var/cvs/contributions/lucene/src/org/mmbase/module/lucene
In directory james.mmbase.org:/tmp/cvs-serv7278/src/org/mmbase/module/lucene

Modified Files:
        Indexer.java 
Log Message:
use a default IndexDefinition if a index doesn't provide one. This makes it 
posisnle for raed-only lucene web-apps to use a simplified luceneindex file 
that only lists the indexes.


See also: 
http://cvs.mmbase.org/viewcvs/contributions/lucene/src/org/mmbase/module/lucene


Index: Indexer.java
===================================================================
RCS file: 
/var/cvs/contributions/lucene/src/org/mmbase/module/lucene/Indexer.java,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- Indexer.java        20 Aug 2008 11:17:02 -0000      1.61
+++ Indexer.java        29 Sep 2008 11:15:22 -0000      1.62
@@ -34,20 +34,24 @@
  *
  * @author Pierre van Rooden
  * @author Michiel Meeuwissen
- * @version $Id: Indexer.java,v 1.61 2008/08/20 11:17:02 michiel Exp $
+ * @version $Id: Indexer.java,v 1.62 2008/09/29 11:15:22 pierre Exp $
  **/
 public class Indexer {
 
     static private final Logger log = Logging.getLoggerInstance(Indexer.class);
 
     /**
+     *  An empty index definition that can be used to obtain nodes from the 
cloud.
+     */   
+    protected static final MMBaseIndexDefinition nodeLoader = new 
MMBaseIndexDefinition();
+
+    /**
      * @since MMBase-1.9
      */
     public enum Multiple {
         ADD, FIRST, LAST;
     };
 
-
     /**
      * Adds a Field to a Document considering also a 'multiple' setting.
      * This arranges what must happen if a certain field with the same name is 
already present in the Document.
@@ -182,7 +186,7 @@
             Node n = id.getNode(userCloud, doc);
             if (n != null) return n;
         }
-        return null;
+        return nodeLoader.getNode(userCloud, doc);
     }
 
     protected Properties loadLastFullIndexTimes() {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to