README.md in fuzzily-0.1.0 vs README.md in fuzzily-0.2.0
- old
+ new
@@ -46,13 +46,11 @@
fuzzily_searchable :name
end
Index your model (will happen automatically for new/updated records):
- MyStuff.find_each do |record|
- record.update_fuzzy_name!
- end
+ MyStuff.bulk_update_fuzzy_name
Search!
MyStuff.find_by_fuzzy_name('Some Name', :limit => 10)
# => records
@@ -83,9 +81,24 @@
end
class MyStuff < ActiveRecord::Base
fuzzily_searchable :name, :class_name => 'CustomTrigram'
end
+
+
+## Speeding things up
+
+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
+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`
+columns in any version
## License
MIT licence. Quite permissive if you ask me.