Changeset 3484


Ignore:
Timestamp:
09/08/10 12:50:04 (17 months ago)
Author:
antonak
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • biobank_search/handwritten/java/plugins/DBIndexPlugin.java

    r3483 r3484  
    166166                 
    167167                                        Document document1 = null; 
    168                                         document1 = new Document(); // TODO : check if this works , otherwise need  to be move inside next for loop  
     168                                        document1 = new Document();  
    169169                                        fullText  = aClass.getName(); 
    170170                                        //System.out.println("[DEBUG]"+fullText); 
     
    173173                                        for(String fieldName: e.getFields()) { 
    174174                                                 
    175                                                 //System.out.println("_________Fieldname : " +  fieldName + "____"); 
    176                                          
    177                                                 //document1 = new Document(); 
     175                                         
    178176 
    179177                                                Field ClassName = new Field("className", aClass.getName().toString(), Field.Store.YES, Field.Index.NOT_ANALYZED); 
     
    187185         
    188186                                                        //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 .  
    190187                                                        fullText = fullText + " " +  e.get(fieldName).toString(); 
    191188         
     
    196193                                                writer.addDocument(document1); 
    197194                                        } 
    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                                         
    210197                                        writer.addDocument(document1); 
    211198                                }                        
Note: See TracChangeset for help on using the changeset viewer.