Add test to demonstrate searching into heterogeneous indexes and building entities of different types. In a nutshall, the responsiblity lies with the client, spring data elasticsearch cannot and should not try to discover entity types, as that would leading building an object composition logic which is not the core area of this library.
With this test, we demonstrate the usage of SearchResultMapper to compose an aggregator object that holds properties from two dfferent entities, The Aggregator is declared as a document but is not indexes (This is not ideal) and we don't recommend to declare @Documents that are not indexed. Please use this as just a pointer to implement SearchResultMapper, this demostartion is not meant to be duplicated in your production systems. There are better ways to compose hetro objects from multi index searches.
This is as trivial as adding a value to the FieldType enum. It doesn't have any
extra properties following the IP type so the
MappingBuilder.addSingleFieldMapping will do the job.
Removed getObject() as it was already implemented using queryForObject()
Changed Method name to multiGet() from getObjects()
Made method to accept searchQuery instead of individual params
EnableElasticsearchRepositoriesTests.bootstrapsRepository() was failing due to scanning entire org.springframework.data.elasticsearch.repositories package.
Moved ComplexRepositoryTests to another package due to which test was failing.
Upgraded to Spring Data Build 1.3.0 RC1 and Spring Data Commons 1.7.0.RC1. Cleaned up pom accordingly.
Adapted repository setup to accommodate for changed lifecycle behavior of repository factories. Marked repositories explicitly created to check for the detection of misconfiguration as @Lazy to prevent them from being instantiated and causing the tests to fail. Added assertion in ElasticsearchEntityInformationCreatorImpl to eagerly fail in case of misconfiguration.
Marked ElasticsearchCrudRepository as @NoRepositoryBean as it should never be considered to be a repository interface to be instantiated.
Tweaked CDI implementation to benefit from new feature in Spring Data Commons to eagerly instantiate CDI repository beans. Fixed capitalization in CDI integration test sample repositories to let the code compile on case-sensitive file systems.