Skip to content

Commit

Permalink
Explain how to set searchable columns in README
Browse files Browse the repository at this point in the history
  • Loading branch information
mmb committed Jun 4, 2016
1 parent 63b34f0 commit 81a9343
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -125,6 +125,16 @@ end

And all your queries would go right! And don`t forget to change the migration for indexes, like shown below.

### Setting Searchable Columns

To change the default behavior of searching all text and string columns,
override the searchable_columns class method on your model:

```ruby
def self.searchable_columns
[:column1, :column2]
end
```

### Creating Indexes for Super Speed
You can have Postgresql use an index for the full-text search. To declare a full-text index, in a
Expand Down

0 comments on commit 81a9343

Please sign in to comment.