A little more information would help here.1> Are you using the same analyzer at both index and query time? 2> Assuming <1> is "yes", did you re-index your data after you created this analyzer? 3> What are the results of query.toString()? Looking at that might help you pinpoint what's going on. 4> Have you examined your index using Luke to see if it has what you *think* it should? 5> If all of the above doesn't do you any good, I've usually found that writing a small, self-contained test case to illustrate the problem is a great help. Usually, during the course of writing the test case I find the problem. And it's usually in my code <G>. And if it's *not* in my code, a test case provides the Lucene folks with something to work with.
The analyzer itself looks like it should do what you want on a cursory inspection..... Best Erick On Wed, Oct 21, 2009 at 7:22 AM, m.harig <m.ha...@gmail.com> wrote: > > hello all > > i've a doubt in plural & singular word searching , i've got code > snippet from nabble forum , > > private static Analyzer createEnglishAnalyzer() { > return new Analyzer() { > public TokenStream tokenStream(String fieldName, Reader reader) > { > TokenStream result = new StandardTokenizer(reader); > result = new StandardFilter(result); > result = new LowerCaseFilter(result); > result = new StopFilter(result, > StandardAnalyzer.STOP_WORDS); > result = new SnowballFilter(result, "English"); > return result; > } > }; > } > > to do my above , but when i search for a keyword "loans" , this code turns > my keyword to "loan" and gives me the results for "loan" keyword , but when > i search for "loan" it should return the results for "loans" keyword. > > please anyone suggest me. > -- > View this message in context: > http://www.nabble.com/singular-and-plural-search-tp25990682p25990682.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >