ankane/searchkick — pull request #76 by nandosousafr (2013-12-07 03:26:24+00:00)
Title: added possibility to filter terms with execution: and option 

let's say i have a many-to-many relationship between `Project` and `Category` models.

i defined `Project` Model like this in order to get categories_title:
```ruby
class Project < ActiveRecord::Base
def search_data
attributes.merge(
categories_id: categories.map(&:title)
)
end
end
```

so in controller:

```ruby
@project_search = Project.search 'house', where: { categories_title: ['farm'] }
```

results in view:

```ruby
# sidebar
farm (3)
house (1)
apartment(2)
```

when i click in `house` i expected just one __project result__, but it returned 4.

i'm not very sure if i fit to your code conventions, but i fixed this way when i'm doing this kind of search:

```ruby
@project_search = Project.search 'house', where: { categories_title: { and: ['farm', 'house'] } }
```
and it returned just one project as i expected.