Udo,<div>I works perfectly with new customers but It doesn&#39;t with old customers that I was added before add the MaSearchStringIndex on #name attribute. Can I rebuild index on MagmaCollection?</div><div><br></div><div>Thanks you,</div>
<div>Facu<br><br><div class="gmail_quote">On Sun, Nov 14, 2010 at 5:49 AM, Udo Schneider <span dir="ltr">&lt;<a href="mailto:udo.schneider@homeaddress.de">udo.schneider@homeaddress.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Facu,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So, my question is: Can I use where: for this funcionality or I need use<br>
select:? If you think that where: is appropiate, Do I need create a new<br>
king of index to reach that?<br>
</blockquote></div>
I added the following method in MagmaCollectionReader which should fullfill your needs:<br>
<br>
read: attributeSymbol beginsWith: aKey<br>
        ^ self read: attributeSymbol from: aKey upTo: aKey maAlphabeticalNext<br>
<br>
This allows you to write your original select: based call as<br>
<br>
self customers where: [:reader | reader read: #name beginsWith: firstsLetterOfName asUppercase]<br>
<br>
<br>
CU,<br>
<br>
Udo<br>
<br>
_______________________________________________<br>
Magma mailing list<br>
<a href="mailto:Magma@lists.squeakfoundation.org" target="_blank">Magma@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/magma" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/magma</a><br>
</blockquote></div><br></div>