lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben West <bwsithspaw...@yahoo.com>
Subject Re: [Lucene.Net] Possible bug in Lucene with Prefix Search and Danish Locale
Date Thu, 30 Jun 2011 14:38:49 GMT
Hey Matt,

This is issue 420: https://issues.apache.org/jira/browse/LUCENENET-420

I think the theory so far has been that the user should manage the culture rather than Lucene.
If you disagree could you post on that issue ticket?

Thanks,
-Ben


----- Original Message -----
From: Matt Warren <mattdebs@gmail.com>
To: lucene-net-dev@lucene.apache.org
Cc: 
Sent: Thursday, June 30, 2011 9:28 AM
Subject: [Lucene.Net] Possible bug in Lucene with Prefix Search and Danish Locale

I think that the code here shows a bug in Lucene.NET, see
http://gist.github.com/1056231.
This happens when using 2.9.2.

After some digging I think that it's due to the way it does a Prefix search.

The main problem is shown by this code http://gist.github.com/1056242.
If the Locale is Danish, this returns FALSE, weird eh!!
   "daab".StartsWith("da") //false
But this works as expected
   "daab".StartsWith("da", StringComparison.InvariantCulture) //true

The line of code that has this problem is the TermCompare(..) function in
PrefixTermEnum.cs,
see
http://svn.apache.org/repos/asf/incubator/lucene.net/trunk/src/core/Search/PrefixTermEnum.cs


Mime
View raw message