Not getting desired result while searching on child attributes

I have a parent say parent which resides with an address and the state of this address is some stateId and he works for remote states as well which might be his service address again associated to some stateId. The url http://*:9200/indexname/indextype/_search?q=stateId:49 does not return the desired result unless stateId 49 is mapped to his address as well as service address. Any help would be appreciated.