README.md in fuzzily-0.3.1 vs README.md in fuzzily-0.3.2
- old
+ new
@@ -107,11 +107,11 @@
include Fuzzily::Model
end
class AddTrigramsModel < ActiveRecord::Migration
extend Fuzzily::Migration
- trigrams_table_name = :custom_trigrams
+ self.trigrams_table_name = :custom_trigrams
end
class MyStuff < ActiveRecord::Base
fuzzily_searchable :name, :class_name => 'CustomTrigram'
end
@@ -121,11 +121,11 @@
For large data sets (millions of rows to index), the "compatible" storage
used by default will typically no longer be enough to keep the index small
enough.
-Users have reported **major improvements** (2 order of magniture) when turning
+Users have reported **major improvements** (2 order of magnitude) when turning
the `owner_type` and `fuzzy_field` columns of the `trigrams` table from
`VARCHAR` (the default) into `ENUM`. This is particularly efficient with
MySQL and pgSQL.
This is not the default in the gem as ActiveRecord does not suport `ENUM`
@@ -139,9 +139,13 @@
class AddTrigramsModel < ActiveRecord::Migration
extend Fuzzily::Migration
trigrams_owner_id_column_type = :uuid
end
```
+
+## Model primary key (id) is VARCHAR
+
+If you set your Model primary key (id) AS `VARCHAR` instead of `INT`, you will need to change the `owner_id` column type from `INT` to `VARCHAR` in the trigrams table.
## Searching virtual attributes
Your searchable fields do not have to be stored, they can be dynamic methods
too. Just remember to add a virtual change method as well.