Hi Rob,
Robert Walpole wrote:
> At the moment I am attempting to do this as follows...
>
> analyzer = new PorterStemAnalyzer();
> parser = new QueryParser("content", analyzer);
> Query query = parser.parse("keywords: relaxing");
> Hits hits = idxSearcher.search(query);
>
> ...but this is not returning any matches.
Are you trying to look up "relaxing" in a field named "keywords"? If
so, the intervening space defeats this - your code results in a search
for (stemmed versions of) "keywords:" or "relaxing" in the default
"content" field.
--
Steve Rowe
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]