Changeset 12255


Ignore:
Timestamp:
2006-07-19T15:55:48+12:00 (16 years ago)
Author:
mdewsnip
Message:

Upgraded the version of Lucene from 1.4.1 to 2.0.0... what's the worst that could happen?

Location:
trunk
Files:
2 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/java/org/nzdl/gsdl/LuceneWrap/Indexer.java

    r11245 r12255  
    5454        // by default, will only index 10,000 words per document
    5555        // Can throw out_of_memory errors
    56         writer_.maxFieldLength = Integer.MAX_VALUE;
     56        writer_.setMaxFieldLength(Integer.MAX_VALUE);
    5757        if (create) {
    5858        writer_.optimize();
     
    140140
    141141        print(" " + qName + ": " + node_id );
    142         current_doc_.add(Field.UnIndexed("nodeID", node_id));
     142        current_doc_.add(new Field("nodeID", node_id, Field.Store.YES, Field.Index.NO));
    143143    }
    144144
     
    154154    {
    155155    if (qName.equals(indexable_current_node_)) {
    156         current_doc_.add(Field.UnStored(qName, current_contents_));
     156        current_doc_.add(new Field(qName, current_contents_, Field.Store.NO, Field.Index.TOKENIZED));
    157157        current_contents_ = "";
    158158    }
  • trunk/gsdl/src/java/org/nzdl/gsdl/LuceneWrap/Makefile

    r12242 r12255  
    22
    33#CLASSPATH = ./lib/lucene-1.4.jar:./lib/soap.jar:./lib/xercesImpl.jar:./lib/xalan.jar:./lib/xml-apis.jar
    4 CLASSPATH = ./lib/lucene-1.4.1.jar:classes
     4LUCENE_JAR = ./lib/lucene-core-2.0.0.jar
     5CLASSPATH = $(LUCENE_JAR):classes
    56
    67
     
    1011
    1112jar:
    12     cd classes && jar xf ../lib/lucene-1.4.1.jar
     13    cd classes && jar xf ../$(LUCENE_JAR)
    1314    jar cvf LuceneWrap.jar -C classes .
    1415
  • trunk/indexers/lucene-gs/src/org/greenstone/LuceneWrapper/Indexer.java

    r11245 r12255  
    5454        // by default, will only index 10,000 words per document
    5555        // Can throw out_of_memory errors
    56         writer_.maxFieldLength = Integer.MAX_VALUE;
     56        writer_.setMaxFieldLength(Integer.MAX_VALUE);
    5757        if (create) {
    5858        writer_.optimize();
     
    140140
    141141        print(" " + qName + ": " + node_id );
    142         current_doc_.add(Field.UnIndexed("nodeID", node_id));
     142        current_doc_.add(new Field("nodeID", node_id, Field.Store.YES, Field.Index.NO));
    143143    }
    144144
     
    154154    {
    155155    if (qName.equals(indexable_current_node_)) {
    156         current_doc_.add(Field.UnStored(qName, current_contents_));
     156        current_doc_.add(new Field(qName, current_contents_, Field.Store.NO, Field.Index.TOKENIZED));
    157157        current_contents_ = "";
    158158    }
  • trunk/indexers/lucene-gs/src/org/greenstone/LuceneWrapper/Makefile

    r12242 r12255  
    22
    33#CLASSPATH = ./lib/lucene-1.4.jar:./lib/soap.jar:./lib/xercesImpl.jar:./lib/xalan.jar:./lib/xml-apis.jar
    4 CLASSPATH = ./lib/lucene-1.4.1.jar:classes
     4LUCENE_JAR = ./lib/lucene-core-2.0.0.jar
     5CLASSPATH = $(LUCENE_JAR):classes
    56
    67
     
    1011
    1112jar:
    12     cd classes && jar xf ../lib/lucene-1.4.1.jar
     13    cd classes && jar xf ../$(LUCENE_JAR)
    1314    jar cvf LuceneWrap.jar -C classes .
    1415
Note: See TracChangeset for help on using the changeset viewer.