Skip to content

Commit

Permalink
Added indexing section
Browse files Browse the repository at this point in the history
  • Loading branch information
eddloschi committed Dec 22, 2013
1 parent 4805cf0 commit b6da31e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ class Person
end
```

### Indexing

There are 3 ways to populate the Sphinx index: use the model class' `sphinx_indexer!` method, `Mongoid::Giza::Indexer.instance.index!` or `Mongoid::Giza::Indexer.instance.full_index`

* **sphinx_indexer!:** Will execute the indexer program only on the indexes of the class.
Does not regenerate dynamic indexes.
* **index!:** Will execute the indexer program on all indexes.
Does not regenerate dynamic indexes.
* **full_index:** Will regenerate dynamic indexes and execute the indexer program on all indexes.

This gem does not execute none of those automatically to let the you define what is the best reindexing strategy for your software.

### Searching

Use the `search` block on the class that have the indexes where the search should run.
Expand Down

0 comments on commit b6da31e

Please sign in to comment.