spring-projects/spring-data-elasticsearch — pull request #24 by hijakk (2013-11-08 19:15:27+00:00)
Title: DATAES-31 Adding ability to use ES Java API setSource directly

As described in https://jira.springsource.org/browse/DATAES-31 and emailed about with Mohsin, these two file changes allow direct access to the elasticsearch Java API setSource method when creating index queries.
I wasn't sure what would happen if somebody tried to setObject and setSource at the same time, so there's an if case at 515 throwing an ElasticsearchException if both are not null.
The elasticsearch API supports setSource with maps, byte arrays or strings, strings seemed to be an easy way to go about handling this. http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/index_.html

I also added the ability to create indexes simply using a string instead of needing a fully defined object class. The createIndexWithoutSettings (561:565) is a little bit of a kludge which means whatever the default ES cluster settings are will be used. It may make sense to create another createIndexWithSettings either taking a simple string index name and explicit values in the input, or using some default values, for the settings.