Forum: Ferret inverted index?

Posted by Denis Haskin (dwhsix)
on 2009-02-28 18: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:
alfred
lfred
fred
red

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

Thoughts?  Is there a better way to do this?

Thanks...  dwh
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.