derekdowling/cs391 — pull request #6 by vbobey (2014-11-19 22:55:33+00:00)
Title: Bulk Loading

Bulk loading will work after 1 small bug is addressed.
The bug has to do with elastic search being picky about newlines.
Here is a stack overflow post on the bug: http://stackoverflow.com/questions/22996337/elasticsearch-no-requests-added-bulk-api-error
To replicate this error run:
```
ruby cli.rb gen --driver 1
```
(or you can replace the 1 with any number)

Basically to do bulk loading we follow this format:
This example shows bulk loading 2 documents:
``` ruby
client.bulk body: [
{ index: { _index: 'myindex', _type: 'mytype'} },
{ data: mydata },

{ index: { _index: 'myindex', _type: 'mytype'} },
{ data: mydata },
]
```
As you can see there is a newline between each document. Our array currently does not have newlines between each document, which is causing the error: "ActionRequestValidationException[Validation Failed: 1: no requests added;]"

If we can fix the newline problem, bulk loading should work perfectly.