Changeset 3484
- Timestamp:
- 09/08/10 12:50:04 (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
biobank_search/handwritten/java/plugins/DBIndexPlugin.java
r3483 r3484 166 166 167 167 Document document1 = null; 168 document1 = new Document(); // TODO : check if this works , otherwise need to be move inside next for loop168 document1 = new Document(); 169 169 fullText = aClass.getName(); 170 170 //System.out.println("[DEBUG]"+fullText); … … 173 173 for(String fieldName: e.getFields()) { 174 174 175 //System.out.println("_________Fieldname : " + fieldName + "____"); 176 177 //document1 = new Document(); 175 178 176 179 177 Field ClassName = new Field("className", aClass.getName().toString(), Field.Store.YES, Field.Index.NOT_ANALYZED); … … 187 185 188 186 //this is the same as InsertFieldValue. Though if you remove it , the field is not included and search does not work. 189 //TODO : check if values of the specific field are empty .190 187 fullText = fullText + " " + e.get(fieldName).toString(); 191 188 … … 196 193 writer.addDocument(document1); 197 194 } 198 //TODO: choose the fieldnames automatically --> trick 199 //TODO : remove these fields 200 /* 201 Field nameField = new Field("name", e.get("name").toString(), Field.Store.YES, Field.Index.NOT_ANALYZED); 202 System.out.println(e.get("name").toString()); 203 document1.add(nameField); 204 205 Field investigationField = new Field("investigation", e.get("investigation").toString(), Field.Store.YES, Field.Index.NOT_ANALYZED); 206 document1.add(investigationField); 207 Field descriptionField = new Field("description", e.get("description").toString(), Field.Store.YES, Field.Index.ANALYZED); 208 document1.add(descriptionField); 209 */ 195 196 210 197 writer.addDocument(document1); 211 198 }
Note: See TracChangeset
for help on using the changeset viewer.