Provide support to increase developer productivity in Java when using Elasticsearch. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
This article says elasticsearch supports Multi-index, Multitype, like:
/_search
Search all types in all indices
Though the following code
new NativeSearchQueryBuilder().withQuery(matchAllQuery()).withTypes("hetro").withIndices(INDEX_1_NAME, INDEX_2_NAME).build()
can search across multiple indices, now I'd like to search across all indices and all types, since I don't know what the indices and types names are.
It seems that I have to specify the indices and types names, because there's a check in the following code in ElasticsearchTemplate:
private SearchRequestBuilder prepareSearch(Query query) {
Assert.notNull(query.getIndices(), "No index defined for Query");
Assert.notNull(query.getTypes(), "No type defined for Query");
...
}
I'm wondering if spring-data-elasticsearch support searching across all indices and types.
YoungChen opened DATAES-356 and commented
This article says elasticsearch supports Multi-index, Multitype, like:
Though the following code
can search across multiple indices, now I'd like to search across all indices and all types, since I don't know what the indices and types names are.
It seems that I have to specify the indices and types names, because there's a check in the following code in ElasticsearchTemplate:
I'm wondering if spring-data-elasticsearch support searching across all indices and types.
Affects: 2.1 GA (Ingalls)