Hi
I've found an error in 1.3. The NOT is not working correct. Here's the
program. With the latest nightly build the Searcher finds the document, but
it should not. With version 1.2 the program works correct.
Regards
Ralph
IndexWriter writer = new IndexWriter("c:\\temp\\ix", new SimpleAnalyzer(), true);
Document doc = new Document();
doc.add(Field.Text("txt", "one"));
doc.add(Field.Text("txt", "two"));
doc.add(Field.UnIndexed("id", "1"));
writer.addDocument(doc);
writer.optimize();
writer.close();
Searcher searcher = new IndexSearcher("c:\\temp\\ix");
Query query = QueryParser.parse("one NOT two", "txt", new SimpleAnalyzer());
Hits hits = searcher.search(query);
for (int i = 0; i < hits.length(); i++) {
System.out.println(hits.doc(i).get("id"));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]