-
Notifications
You must be signed in to change notification settings - Fork 49
- Directly through my git account, I’m happy to help :)
- Through the google group for Picky
See weights option in Queries Configuration.
In short: Queries take an option, for example
:weights => Query::Weights.new([:title, :author] => 3)
that gives bonus points to the title-author combination. (6 is high, 0 is the default, -6 is a harsh penalty)
Note that the order is important. So [:title, :author]
is not the same as [:author, :title]
. If you find that people search title, then author much more often than author, title, then penalize the latter, and give bonus points to the former.
Currently, Picky uses as default a partial index (for * Queries, like “Yukihiro Matsu*”) a generator Partial::Substring.new(:from => -3)
(negative numbers count from the end), which means that you will get a result when searching for:
- “Yukihiro Matsumo”
- “Yukihiro Matsumot”
- “Yukihiro Matsumoto” (from the exact index)
It is intensive, generating an index for all subtokens of e.g. Matsumoto.
If you don’t need partial searching:
field(:title, :partial => Partial::None.new)
Like this you find only:
- “Yukihiro Matsumoto”
Another option is one that starts from the e.g. fifth character:
field(:title, :partial => Partial::Substring.new(:from => 5))
That would yield:
- “Yukihiro Matsu”
- “Yukihiro Matsum”
- “Yukihiro Matsumo”
- “Yukihiro Matsumot”
- “Yukihiro Matsumoto”
(Usually the negative value makes more sense)
Hope that helps!
The front end has 5 built-in languages: en, de, fr, it, ch.
It uses the lang attribute set in the html tag as a queue as to which language to use. en is default.
Contact me if you need more.