[jsword-svn]
jsword/java/jsword/org/crosswire/jsword/book/search/lucene s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Sat Dec 31 07:35:49 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene
In directory www.crosswire.org:/tmp/cvs-serv8559/java/jsword/org/crosswire/jsword/book/search/lucene
Modified Files:
LuceneIndex.java
Log Message:
Prepratory change for Lucene 1.9/2.0.
Index: LuceneIndex.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/book/search/lucene/LuceneIndex.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** LuceneIndex.java 13 Aug 2005 14:41:41 -0000 1.25
--- LuceneIndex.java 31 Dec 2005 14:35:47 -0000 1.26
***************
*** 186,190 ****
Analyzer analyzer = new SimpleAnalyzer();
! Query query = QueryParser.parse(search, LuceneIndex.FIELD_BODY, analyzer);
Hits hits = searcher.search(query);
--- 186,191 ----
Analyzer analyzer = new SimpleAnalyzer();
! QueryParser parser = new QueryParser(LuceneIndex.FIELD_BODY, analyzer);
! Query query = parser.parse(search);
Hits hits = searcher.search(query);
***************
*** 350,353 ****
--- 351,356 ----
doc.add(Field.UnIndexed(FIELD_NAME, subkey.getOsisRef()));
doc.add(Field.Text(FIELD_BODY, new StringReader(text)));
+ // Lucene 1.9/2.0 doc.add(new Field(FIELD_NAME, subkey.getOsisRef(), Field.Store.YES, Field.Index.NO));
+ // // Lucene 1.9/2.0 doc.add(new Field(FIELD_BODY, new StringReader(text)));
writer.addDocument(doc);
}
More information about the jsword-svn
mailing list