# Index on subfield combined

**URL:** <https://discuss.elastic.co/t/index-on-subfield-combined/96946>\
**Category:** Elasticsearch\
**Created:** [August 14, 2017, 10:33am UTC](https://discuss.elastic.co/t/index-on-subfield-combined/96946 "2017-08-14T10:33:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deepak\_Chhikara](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@Deepak\_Chhikara](https://discuss.elastic.co/u/Deepak_Chhikara)\
**Post date:** [August 14, 2017, 10:33am UTC](https://discuss.elastic.co/t/index-on-subfield-combined/96946/1 "2017-08-14T10:33:34Z")

</div>

I have data where phone number is in parts. Therefore I created as an array(object). But I want to search on the complete phone number now.

"Phone":{  
"type" : "object",  
"properties" : {  
"first" : {  
"type" : "text"  
},  
"second": {  
"type" : "text"  
}  
}  
}

Now I want search something like give me all phone numbers containing 987.  
Pardon me if the question is very trivial, I'm new to this field and couldn't find any resource answering to the question.

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [September 7, 2017, 7:26am UTC](https://discuss.elastic.co/t/index-on-subfield-combined/96946/2 "2017-09-07T07:26:08Z")

</div>

There are some good resources regarding phone number search here: [Search phone number](https://discuss.elastic.co/t/search-phone-number/32771)

Hope that helps!

---

<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:** [October 5, 2017, 7:26am UTC](https://discuss.elastic.co/t/index-on-subfield-combined/96946/3 "2017-10-05T07:26:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
