Re: analyzer not working properly when indexing

2010-04-21 Thread jm
ok, got this. I upgraded my analyzer to new api but it was not correct... thanks On Wed, Apr 21, 2010 at 11:45 AM, Ian Lea wrote: > OK, so it does indeed look like a problem with your analyzer, as you > suspected. > > You could confirm that by using e.g. WhitespaceAnalyzer instead.  Then > mayb

Re: analyzer not working properly when indexing

2010-04-21 Thread Ian Lea
OK, so it does indeed look like a problem with your analyzer, as you suspected. You could confirm that by using e.g. WhitespaceAnalyzer instead. Then maybe post the code for your custom analyzer, or step through in a debugger or however you prefer to debug code. -- Ian. On Wed, Apr 21, 2010 a

Re: analyzer not working properly when indexing

2010-04-21 Thread jm
I am using a TermQuery so no analyzer used... protected static int getHitCount(Directory directory, String fieldName, String searchString) throws IOException { IndexSearcher searcher = new IndexSearcher(directory, true); //5 Term t = new Term(fieldName, searchString); Query

Re: analyzer not working properly when indexing

2010-04-20 Thread Ian Lea
Are you using the same analyzer for searching, in your unshown getHitCount() method? There is lots of good advice in the FAQ under "Why am I getting no hits / incorrect hits?". And/or write the index to disk and use Luke to check that the correct content is being indexed. -- Ian. On Tue, Apr

analyzer not working properly when indexing

2010-04-20 Thread jm
I am encountering a strange issue. I have a CustomStopAnalyzer. If I do this (supporting code taken from AnalyzerUtils in LIA3 source code Mike uploaded): Analyzer customStopAnalyzer = new CustomStopAnalyzer(); AnalyzerUtils.displayTokensWithFullDetails(customStopAnalyzer, "mail77")