Hi. I have a problem with multiple types.
If I specify multiple type with comma, It's getting data from just one specific type.
Let's assume that we have an index which name is "account_test"
"account" has 3 types in it which are "Campaign", "Advertiser", "Agency"
"Campaign" has one data as below
{
"_index": "account_test",
"_type": "Campaign",
"_id": "102399",
"_score": 1,
"_source": {
"ID": "CM_12022015",
"NAME": "CM_12022015",
"Advertiser": {
"ID": "Adv_12022015",
"NAME": "unknown_advertiser"
}
}
"Advertiser" has one data as below
{
"_index": "account_test",
"_type": "Advertiser",
"_id": "52957",
"_score": 1,
"_source": {
"ID": "Adv_12022015",
"NAME": "unknown_advertiser",
}
}
Now I want to find these with the keyword "Adv_12022015".
- No type specified in URL
http://eshost:9200/account_test/_search?q=Campaign.Advertiser.ID:*adv_12022015* OR Advertiser.ID:*adv_12022015*
// Total : 2
It is getting both 2 data correctly.
However If I specify types in it, It only gets "Campaign" data.
- Single type
http://eshost:9200/account_test/Campaign/_search?q=Campaign.Advertiser.ID:*adv_12022015* OR Advertiser.ID:*adv_12022015*
// Total : 1
and
http://eshost:9200/account_test/Advertiser/_search?q=Campaign.Advertiser.ID:*adv_12022015* OR Advertiser.ID:*adv_12022015*
// Total : 1
It works correctly. Both query gets data from each specified type.
- Multiple types with comma
http://eshost:9200/account_test/Advertiser,Campaign/_search?q=Campaign.Advertiser.ID:*adv_12022015* OR Advertiser.ID:*adv_12022015*
// Total : 1
However If I specify multiple types with comma in url, it gets only data from "Campaign".
Single type is fine, It is only a problem when I use multiple type with comma.
I think it is similar to the issue #2218
Please check it out.
Thank you.
Installed Elastic Search Info
{
"status": 200,
"name": "node1",
"cluster_name": "es.oas.cluster",
"version": {
"number": "1.4.2",
"build_hash": "927caff6f05403e936c20bf4529f144f0c89fd8c",
"build_timestamp": "2014-12-16T14:11:12Z",
"build_snapshot": false,
"lucene_version": "4.10.2"
},
"tagline": "You Know, for Search"
}