On Wed, 11 Sep 2002 [EMAIL PROTECTED] wrote:
> 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,
Maybe I'm missing something, but it looks like your document is "hello
world" and your query string is "goodbye everyone". Under those
circumstances (no overlap of index and query) I'd expect 0 hits.
Good luck--
Joshua O'Madadhain
[EMAIL PROTECTED] Per Obscurius...www.ics.uci.edu/~jmadden
Joshua O'Madadhain: Information Scientist, Musician, Philosopher-At-Tall
It's that moment of dawning comprehension that I live for--Bill Watterson
My opinions are too rational and insightful to be those of any organization.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>