Repository navigation
Results format and structure
It’s a library search. You search for "Pinchn~", and Picky has a result with Pynchon in the title.
You get back a JSON formatted string from Picky:
{"offset":0,"total":1,"duration":0.022148,"allocations":[["books",6.0,1,[["title","Pinchn~","pynchon"]],[27]]]}
JSON. A very lightweight data interchange format. Picky is using a very fast, C-based lib to put the JSON strings together. The client is using the same lib to unwrap the JSON-formatted results.
Picky gives you a hash:
{ offset: // The results have this offset. An offset of 10 will omit the first 10 ids and // give you ids from the 11th position and up. total: // The total amount of results found, covering all allocations. duration: // How long it took Picky to find the results. Rack time, transfer time, // and HTTP header adding not included. Just the time it took Picky itself to find the result. allocations: // An array of possible allocations of search terms to categories (see below). Using the example above we get: [ ["books", // The index name. 6.0, // The weight of the result. Allocations are ordered by their weights. [ "title", // Name of the category of the following search terms. "Pinchn~", // The original search term (upper case and all). "pynchon" // The search term as picky interpreted it. ], ... // More search terms in this allocation. ], ... // More allocations, ordered by weight, descending. ] }
That’s it. Simple and easy to remember :)
Say you’ve searched for "Pinchn~ Novel". You’ll get an allocation from Picky, like this:
["books",7.39,1,[["title","Pinchn~","pynchon"],["title","Novel","novel"]],[]]
"books": The name of the index this allocation is coming from.
7.39: The weight of this allocation. You can increase this by setting weights in the Query configuration, see Query Configuration.
[["title","Pinchn~","pynchon"],["title","Novel","novel"]]: Search terms with categories and Picky-interpreted terms. They are ordered as the user entered them. Described below:
"title": The category where "pynchon" has been found.
"Pinchn~": The original search term the user entered.
"pynchon": The search term that has been normalized by Picky. This one can be reused for a future query, as the interface actually does.