lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Warren <mattd...@gmail.com>
Subject [Lucene.Net] Possible bug in Lucene with Prefix Search and Danish Locale
Date Thu, 30 Jun 2011 14:28:43 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message