Hi. I'm currently using the latest version from SVN of Lucene.Net 2.1. When compiling it for .Net 2.0 I ran into an interesting "feature". Query expansion stops before expected. After a lot of debugging, I found the culprit to be PrefixQuery's Rewrite method. It uses string.StartsWith (string); However in .Net 2.0 this will then break on any box with different culture settings than English. Since .Net 2.0 StartsWith has the overload StartsWith(string, StringComparisonType) and this is set to default to StringComparison.CurrentCulture
Norwegian culture for instance states that 'aa' is the same as the single letter 'å' So when my index contains para-orange, paraaminosyre para.... and I do the PrefixQuery para* this method fails on the if(term.Text().StartsWith(prefixText)) test. on paraaminosyre.StartsWith(para). The fix for me was to change the line in PrefixQuery.cs::Rewrite() from if(term != null && term.Text().StartsWith(prefixText) && term.Field() == prefixField) to if (term != null && term.Text().StartsWith(prefixText, StringComparison.Ordinal) && term.Field() == prefixField) This is a new "feature" in .Net 2.0 and did not affect my .Net 1.1 projects which still uses the .Net 1.1 library. Conditional compilation might be required. -- Regards, Christopher Kolstad E-mail: [EMAIL PROTECTED] (University) [EMAIL PROTECTED] (Home) [EMAIL PROTECTED] (Job)