lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: NOT Bug in 1.3
Date Fri, 07 Feb 2003 18:45:43 GMT
I just fixed this.  Try the latest sources in CVS.

Doug

Ralph Schaer wrote:
> 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: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message