Re: Difference in behaviour between LowerCaseFilter and String.toLowerCase()

2012-12-04 Thread Ian Lea
Dawid said "that's how it's supposed to work" which to me = "intended behaviour". -- Ian. On Tue, Dec 4, 2012 at 6:33 AM, Trejkaz wrote: > On Tue, Dec 4, 2012 at 10:09 AM, Vitaly Funstein wrote: >> If you don't need to support case-sensitive search in your application, >> then you may be able

Re: Difference in behaviour between LowerCaseFilter and String.toLowerCase()

2012-12-03 Thread Trejkaz
On Tue, Dec 4, 2012 at 10:09 AM, Vitaly Funstein wrote: > If you don't need to support case-sensitive search in your application, > then you may be able to get away with adding string fields to your > documents twice - lowercase version for indexing only, and verbatim to > store. Actually, I will

Re: Difference in behaviour between LowerCaseFilter and String.toLowerCase()

2012-12-03 Thread Vitaly Funstein
If you don't need to support case-sensitive search in your application, then you may be able to get away with adding string fields to your documents twice - lowercase version for indexing only, and verbatim to store. For example (this is Lucene 4 code, but same idea), // indexed - not stored d

Re: Difference in behaviour between LowerCaseFilter and String.toLowerCase()

2012-12-01 Thread Dawid Weiss
Iterating character-by-character is different than considering the entire string at once so your observation is correct, that's how it's supposed to work. In particular, note this in String#toLowerCase documentation: "Since case mappings are not always 1:1 char mappings, the resulting String may b

Re: Difference in behaviour between LowerCaseFilter and String.toLowerCase()

2012-11-30 Thread Trejkaz
On Fri, Nov 30, 2012 at 8:22 PM, Ian Lea wrote: > Sounds like a side effect of possibly different, locale-dependent, > results of using String.toLowerCase() and/or Character.toLowerCase(). > > http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#toLowerCase() > specifically mentions Turk

Re: Difference in behaviour between LowerCaseFilter and String.toLowerCase()

2012-11-30 Thread Ian Lea
Sounds like a side effect of possibly different, locale-dependent, results of using String.toLowerCase() and/or Character.toLowerCase(). http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#toLowerCase() specifically mentions Turkish. A Google search for "Character.toLowerCase() turkish

Difference in behaviour between LowerCaseFilter and String.toLowerCase()

2012-11-29 Thread Trejkaz
Hi all. trying to figure out what I was doing wrong in some of my own code so I looked to LowerCaseFilter since I thought I remembered it doing this correctly, and lo and behold, it failed the same test I had written. Is this a bug or an intentional difference in behaviour? @Test public