Skip to content
Florian Hanke edited this page Oct 30, 2010 · 24 revisions

FAQ

Where to ask my questions?

How can I make Picky weigh certain results higher?

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.

Note that even if you give it a penalty of -1’000’000, it will always appear in the results. Just at the end of all combinations. But Picky will never drop a combination. Octopuses don’t do that.

How can I make the indexing faster?

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 subtokens of e.g. Matsumoto. From -3 is not so hard on the indexer, but:
If you don’t need partial searching:

category(:title, :partial => Partial::None.new)

Like this you find only:

  • “Yukihiro Matsumoto”

Another option is one that starts from the e.g. fifth character:

category(: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! If you have the time, use Partial::Substring.new(:from => 1). It yields the best results, usually.

How do I set the language of the Picky Javascript front end?

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.