I have index define like this
{
"mappings": {
"my_mapping1": {
"dynamic": false,
"_all": { "enabled": false },
"_source": { "enabled": false },
"properties": {
"my_property1": { "type": "long", "store": true },
}
},
"my_mapping2": {
query = QueryBuilders.matchQuery("my_property1", "123123");
Set<String> queryIndices = new HashSet<>();
queryIndices.add("my_index_name");
SearchResponse searchResponse = searchBuilder(SearchType.DFS_QUERY_THEN_FETCH, query, fields,
queryIndices.toArray(new String[queryIndices.size()]), params.getType())
.setSize(size)
.execute().actionGet();
How do I specify that I am searching on my_mapping1 and not my_mapping2
And follow up question, does matchQuery's type matter like instead of string should i query with long object?