Changeset 20341 for greenstone3

Show
Ignore:
Timestamp:
19.08.2009 23:18:26 (11 years ago)
Author:
davidb
Message:

Update of Indexer.java code to work with latest version of Lucene API

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/sites/localsite/collect/gberg/java/Indexer.java

    r5956 r20341  
    105105 
    106106        if (scope.equals(qName)) { 
    107         current_doc.add(Field.UnIndexed("nodeID", this.file_id+"."+qName)); 
     107 
     108            current_doc.add(new Field("nodeID", this.file_id+"."+qName, 
     109                      Field.Store.YES,Field.Index.NO)); 
    108110        } else { 
    109         current_doc.add(Field.UnIndexed("nodeID", this.file_id+"."+scope+"."+qName+"."+node_id)); 
     111        current_doc.add(new Field("nodeID", this.file_id+"."+scope+"."+qName+"."+node_id, 
     112                      Field.Store.YES,Field.Index.NO)); 
    110113        } 
    111114    } 
     
    113116    public void endElement(String uri, String localName, String qName) throws SAXException { 
    114117    if (XMLTagInfo.isIndexable(qName) && qName.equals(current_node)) { 
    115         current_doc.add(Field.UnStored("content", current_contents)); 
     118        current_doc.add(new Field("content", current_contents, 
     119                      Field.Store.NO,Field.Index.TOKENIZED)); 
    116120        try { 
    117121        writer.addDocument(current_doc);