lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kd...@ezifile.com
Subject Quotes in keyword field searches
Date Wed, 11 Sep 2002 03:00:42 GMT
Hi All,

I'm trying to run a search on a keyword field on a document. I've got the 
following code:

Query query = QueryParser.parse("test:\"hello world\", "", new 
StandardAnalyzer());
logger.debug("Searching for: " + query.toString("") + " using " + 
query.toString());
Hits hits = searcher.search(query);


The test field was populated with:

doc.add(Field.Keyword("test", "hello world"));


The logger output is:

Searching for: key:"goodbye everyone" using 
org.apache.lucene.search.PhraseQuery@5cda3f


For some reason that I can't fathom, the search is returning 0 hits...

Thanks for any help,

Kiril

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message