Permalink
Browse files

+ New option tokenize

  • Loading branch information...
1 parent d46b6dc commit 4d8036979605ddecabcb42e9748b4dbe98b70c9a @floere committed Mar 3, 2013
Showing with 21 additions and 0 deletions.
  1. +20 −0 web/source/documentation/_category.html.md
  2. +1 −0 web/source/documentation/_index.html.md
@@ -239,6 +239,26 @@ But if you need to, use as with the index.
source: some_source
end
+### Option tokenize{#indexes-categories-tokenize}
+
+Set this option to `false` when you give Picky already tokenized data (an Array, or generally an Enumerator).
+
+ Index.new :people do
+ category :names, tokenize: false
+ end
+
+And Person has a method `#names` which returns this array:
+
+ class Person
+
+ def names
+ ['estaban', 'julio', 'ricardo', 'montoya', 'larosa', 'ramirez']
+ end
+
+ end
+
+Then Picky will simply use the tokens in that array without (pre-)processing them. Of course, this means you need to really do all the tokenizing work. If you leave the tokens uppercase, then nothing will be found, unless you set the Search to be case-sensitive, for example.
+
### User Search Options{#indexes-categories-searching}
Users can use some special features when searching. They are:
@@ -72,6 +72,7 @@ How is the data categorized?
* [Option from](#indexes-categories-from)
* [Option key_format](#indexes-categories-keyformat)
* [Option source](#indexes-categories-source)
+* [Option tokenize](#indexes-categories-tokenize)
How is the data prepared?

0 comments on commit 4d80369

Please sign in to comment.