Re: Porter stemming problem

2007-06-22 Thread Steven Rowe
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 ret

Re: Porter stemming problem

2007-06-22 Thread Erick Erickson
Yes, you should also stem the query terms. Otherwise, you'll have indexed "working" as "work", but your search for "working" will look for "working" and won't match. Which is not what you want, I'm sure. Query.toString() will tell you a lot about how queries are processed, BTW In general, un

Porter stemming problem

2007-06-22 Thread Robert Walpole
Hi, I am using the PorterStemAnalyzer class (attached) to provide stemming for a Lucene index. To stem the terms in the index we use the following... //open an index writer in append mode IndexWriter idxWriter = new IndexWriter(LUCENE_INDEX_PATH, new PorterStemAnalyzer(), false); //add the luce