Forum: Ferret inverted index?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Denis H. (Guest)
on 2009-02-28 19:37
Wondering if this is an appropriate application of ferret...

I need to be able to do a substring search; e.g. a search on 'fred'
would match 'alfred', 'freddo', 'frederick', etc...

The field in question is short (yes, it's a username), but doing a MySQL
"LIKE '%fred%'" seemms to be unacceptably slow.

I'm thinking if I put together a quick trailing-substring analyzer, this
would be pretty easy to do with ferret.  E.g., 'alfred' gets indexed as:

(3-char word minimum is probably ok in this case)

Thoughts?  Is there a better way to do this?

Thanks...  dwh
This topic is locked and can not be replied to.