Searching magma string indices

Chris Muller asqueaker at gmail.com
Wed Apr 4 03:21:56 UTC 2007


Yes, you are right.  But the "reversed" index is not needed anyway,
since Brents solution 3 "complex wildcards" would fit the bill for
finding suffixes..

Also, you really said it all right here:

> Actually, if you used that scheme to get the candidates that could be valid, and then ran one last check using the equivalent of #match: (beefed up for single character wildcards - need to write that) on the candidates, that would be water tight.  That is, pick up the possible candidates, get the actual value form the object, and see if that attirbute of the object actually matches the pattern as passed in.  This way you get most of the benefit of the index AND you can make sure it is right.

This is something that everyone has asked for and what I would really
like for Magma to have myself..  Unfortunately, I did not find a way
to implement it within the Readers; their paging information
maintained in the client image represents the pages as seen by the
server..  And the server doesn't (necessarily) have the domain classes
present in the image to be able to perform the final select block
filtering..

Thanks,
  Chris


On 3/30/07, Chris Cunningham <cunningham.cb at gmail.com> wrote:
> On 3/1/07, Chris Muller <chris at funkyobjects.org> wrote:
> > Hi Brent!
> >
> > I think you've cleverly solved your own question..  By indexing the
> reversed value, its no different than a keyword index where you can already
> query on the presence of multiple keywords, as in:
>
> ...
>
>
> > You don't even need a separate "reversed" index, just add two entries (the
> forward and reversed) for each object added to the collection.
>
>
> Actually, wouldn't this give you wrong results?  That is, if in the normal
> collection you had "foobar" and "rabbit" and searched for '%bar', I think
> you would get back both "foobar" and "rabbit" (since it would match on
> raboof and rabbit, right?).
>
> So, for safety, I would still suggest having 2 collections - or maybe
> tagging the collection with a notice if it is a reversed value or not.
>
> -ChrisC
>
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
>


More information about the Magma mailing list