elasticsearch/elasticsearch-rails — pull request #111 by AaronRustad (2014-05-09 00:31:17+00:00)
Title: Allow parent to be defined when importing a given class.

This allows the `#import` method to specify the parent document.

```ruby
class Article
belongs_to :author
end
```

```ruby
Article.import parent: 'author_id'
```

```bash
bundle exec rake environment elasticsearch:import:model CLASS='Article' PARENT='author_id'
```

This results in bulk data as follows:
```json
{"index":{"_id":15,"_parent":1}}
{"id":15,"author_id":1, ... }
```