elasticsearch/elasticsearch-rails — pull request #104 by AaronRustad (2014-05-05 22:49:11+00:00)
Title: Define scope on Imports

This allows a named scoped to be defined inside the model and identified during the import as a means of providing finer control on how and what gets imported.

```ruby
class Article
scope :import_scope, -> { where(deleted_at: nil) }
end
```

```bash
bundle exec rake environment elasticsearch:import:model CLASS='Article' SCOPE='import_scope'
```

I didn't add support to the mongoid adapter, not sure if that'll be a blocker.

Please let me know if I can improve or I should look at a different way for solving this problem.

Thanks!
AR