+ (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 UnIndexedSearchTerm("webdb_create", "search_irrelevant",
+ "creationDate", "creationDate", "creationDate")).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);
+
+ (new ImagesSearchTerm()).index(theDoc, entity);
+
+ (new AudioSearchTerm()).index(theDoc, entity);
+
+ (new VideoSearchTerm()).index(theDoc, entity);
+
+ //comments-just aggregate all relevant fields
+ //removed until i get a chance to do this right
+ //String commentsAggregate = "";
+ //TemplateModel comments=entity.get("to_comments");
+ //if (comments != null){
+ // while (((TemplateListModel)comments).hasNext()){
+ // TemplateModel aComment = ((TemplateListModel)comments).next();
+ // commentsAggregate = commentsAggregate + " " + ((TemplateHashModel)aComment).get("title").toString()
+ // + " " + ((TemplateHashModel)aComment).get("creator").toString()
+ // + " " + ((TemplateHashModel)aComment).get("text").toString();
+ // }
+ //}
+ //theDoc.add(Field.UnStored("comments",commentsAggregate));
+ indexWriter.addDocument(theDoc);