# Not getting All data in case of multiple types. Getting data for one specific type

**URL:** <https://discuss.elastic.co/t/not-getting-all-data-in-case-of-multiple-types-getting-data-for-one-specific-type/37666>\
**Category:** Elasticsearch\
**Created:** [December 21, 2015, 6:52am UTC](https://discuss.elastic.co/t/not-getting-all-data-in-case-of-multiple-types-getting-data-for-one-specific-type/37666 "2015-12-21T06:52:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheonsoo](https://avatars.discourse-cdn.com/v4/letter/c/dc4da7/32.png) [@cheonsoo](https://discuss.elastic.co/u/cheonsoo)\
**Post date:** [December 21, 2015, 6:52am UTC](https://discuss.elastic.co/t/not-getting-all-data-in-case-of-multiple-types-getting-data-for-one-specific-type/37666/1 "2015-12-21T06:52:13Z")

</div>

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

```auto
{
	"_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

```auto
{
	"_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**

```auto
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**

```auto
http://eshost:9200/account_test/Campaign/_search?q=Campaign.Advertiser.ID:*adv_12022015* OR Advertiser.ID:*adv_12022015*
// Total : 1

```

and

```auto
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**

```auto
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](https://github.com/elastic/elasticsearch/issues/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"  
}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:29pm UTC](https://discuss.elastic.co/t/not-getting-all-data-in-case-of-multiple-types-getting-data-for-one-specific-type/37666/2 "2017-07-05T23:29:39Z")

</div>


