-
Notifications
You must be signed in to change notification settings - Fork 49
floere edited this page Oct 19, 2010
·
24 revisions
- Me directly through my git account, I’m happy to help :)
- Through the google group for Picky
Currently, Picky uses as default a partial index (for * Queries, like “Yukihiro Matsu*”) a generator Partial::Subtoken.new( :down_to => 1 ), which means that you will get a result when searching for:
- “Yukihiro Matsumoto” (from the exact index)
- “Yukihiro Matsumot” (from here on from the partial index)
- “Yukihiro Matsumo”
- “Yukihiro Matsum”
- “Yukihiro Matsu”
- “Yukihiro Mats”
- “Yukihiro Mat”
- “Yukihiro Ma”
- “Yukihiro M”
It is very intensive, generating an index for all subtokens of e.g. Matsumoto.
If you don’t need that, use a partial generator that just goes down 3 characters:
field(:title, :partial => Partial::Subtoken.new(:down_to => -3))
Like this you find:
- “Yukihiro Matsumot”
- “Yukihiro Matsumo”
- “Yukihiro Matsum”
Or absolute, one that goes down to the e.g. fourth character:
field(:title, :partial => Partial::Subtoken.new(:down_to => 4))
Hope that helps!