Range Queries fail for MaSearchStringIndex when using Umlauts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Range Queries fail for MaSearchStringIndex when using Umlauts

Udo Schneider
All,

I'm currently using Magma to perform a prefix search on City names. I
found out that this fails if the string contains umlauts or, to be more
precise, if the last given char is not Ascii.

E.g.
myCollection where: [ :reader | reader read: #city from: 'Me' to: 'Me'
maAlphabeticalNext]
works fine. Changing the prefix to 'Mü' fails (no result).

I assume that this is somehow connected to a) maAlphabeticalNext and b)
the "allowed" characters for MaSearchStringIndex (BTW: #beAscii doesn't
help here). I'm currently using MaByteSequenceIndex to circumvent the
problem but I am not sure whether this is the intention.

I attached a Testcase which shows the problem.

Thanks,

Udo

_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma

BWRangeQueryTests.st (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Range Queries fail for MaSearchStringIndex when using Umlauts

Chris Muller-3
Hi Udo, yes, the index-types that come included with Magma are ASCII
only.  They are just "working-examples" of how such index-types can be
written, which may be used by application designers who need more to
help create their own subclass of MagmaCollectionIndex.

 - Chris

On Wed, Oct 13, 2010 at 2:22 PM, Udo Schneider
<[hidden email]> wrote:

> All,
>
> I'm currently using Magma to perform a prefix search on City names. I found
> out that this fails if the string contains umlauts or, to be more precise,
> if the last given char is not Ascii.
>
> E.g.
> myCollection where: [ :reader | reader read: #city from: 'Me' to: 'Me'
> maAlphabeticalNext]
> works fine. Changing the prefix to 'Mü' fails (no result).
>
> I assume that this is somehow connected to a) maAlphabeticalNext and b) the
> "allowed" characters for MaSearchStringIndex (BTW: #beAscii doesn't help
> here). I'm currently using MaByteSequenceIndex to circumvent the problem but
> I am not sure whether this is the intention.
>
> I attached a Testcase which shows the problem.
>
> Thanks,
>
> Udo
>
> _______________________________________________
> Magma mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
>
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Range Queries fail for MaSearchStringIndex when using Umlauts

Udo Schneider
Chris,

thanks alot for the confirmation. I'm using now which is working fine.
Next thing to do is a Phonetic Index ... but that's a different story :-)

Best Regards,

Udo



On 13.10.10 21:56, Chris Muller wrote:

> Hi Udo, yes, the index-types that come included with Magma are ASCII
> only.  They are just "working-examples" of how such index-types can be
> written, which may be used by application designers who need more to
> help create their own subclass of MagmaCollectionIndex.
>
>   - Chris
>
> On Wed, Oct 13, 2010 at 2:22 PM, Udo Schneider
> <[hidden email]>  wrote:
>> All,
>>
>> I'm currently using Magma to perform a prefix search on City names. I found
>> out that this fails if the string contains umlauts or, to be more precise,
>> if the last given char is not Ascii.
>>
>> E.g.
>> myCollection where: [ :reader | reader read: #city from: 'Me' to: 'Me'
>> maAlphabeticalNext]
>> works fine. Changing the prefix to 'Mü' fails (no result).
>>
>> I assume that this is somehow connected to a) maAlphabeticalNext and b) the
>> "allowed" characters for MaSearchStringIndex (BTW: #beAscii doesn't help
>> here). I'm currently using MaByteSequenceIndex to circumvent the problem but
>> I am not sure whether this is the intention.
>>
>> I attached a Testcase which shows the problem.
>>
>> Thanks,
>>
>> Udo
>>
>> _______________________________________________
>> Magma mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/mailman/listinfo/magma
>>
>>


_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma