simple and stable, about to be broken again soon
authorjohn <john>
Wed, 27 Nov 2002 15:25:49 +0000 (15:25 +0000)
committerjohn <john>
Wed, 27 Nov 2002 15:25:49 +0000 (15:25 +0000)
source/mircoders/producer/IndexingProducerNode.java

index 4f6d124..2d1a063 100755 (executable)
@@ -106,15 +106,19 @@ public class IndexingProducerNode implements ProducerNode {
 
 
       (new KeywordSearchTerm("id","","id","","id")).index(theDoc,entity);
-      (new KeywordSearchTerm("webdb_create_formatted","search_date","webdb_create_formatted","","webdb_create_formatted")).index(theDoc,entity);
+      (new KeywordSearchTerm("date_formatted","search_date","webdb_create_formatted","webdb_create_formatted","webdb_create_formatted")).index(theDoc,entity);
 
       (new UnIndexedSearchTerm("","","","where","where")).indexValue(theDoc,entity.getValue("publish_path")+entity.getValue("id")+".shtml");
 
-      (new TextSearchTerm("creator","search_creator","creator","","creator")).index(theDoc,entity);
-      (new TextSearchTerm("title","search_title","title","","title")).index(theDoc,entity);
-      (new TextSearchTerm("description","search_content","description","","description")).index(theDoc,entity);
+      (new TextSearchTerm("creator","search_creator","creator","creator","creator")).index(theDoc,entity);
+      (new TextSearchTerm("title","search_title","title","title","title")).index(theDoc,entity);
+      (new UnIndexedSearchTerm("description","search_content","description","description","description")).index(theDoc,entity);
 
-      (new UnStoredSearchTerm("content_data","search_content","content","","")).index(theDoc,entity);
+      (new ContentSearchTerm("content_data","search_content","content","","")).indexValue(theDoc,
+                                                                                    entity.getValue("content_data")+ " "
+                                                                                    + entity.getValue("description")+ " "
+                                                                                    + entity.getValue("title")
+                                                                                    );
 
       (new TopicSearchTerm()).index(theDoc,entity);
 
@@ -147,7 +151,6 @@ public class IndexingProducerNode implements ProducerNode {
     catch (Throwable t) {
       aLogger.error("Error while indexing content: " + t.getMessage());
       t.printStackTrace(new PrintWriter(new LoggerToWriterAdapter(aLogger, LoggerWrapper.DEBUG_MESSAGE)));
-      //should remove index lock here.....jd
     }
     finally {
       if (indexReader != null){