# Analyze Only the last 7 digit value eg"telephone number"

**URL:** <https://discuss.elastic.co/t/analyze-only-the-last-7-digit-value-eg-telephone-number/63279>\
**Category:** Elasticsearch\
**Created:** [October 18, 2016, 10:37am UTC](https://discuss.elastic.co/t/analyze-only-the-last-7-digit-value-eg-telephone-number/63279 "2016-10-18T10:37:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![banu](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@banu](https://discuss.elastic.co/u/banu)\
**Post date:** [October 18, 2016, 10:37am UTC](https://discuss.elastic.co/t/analyze-only-the-last-7-digit-value-eg-telephone-number/63279/1 "2016-10-18T10:37:24Z")

</div>

I have a mappings like this  
{  
"mappings": {

```
"telephones": {
  
	"properties": {
		"test": {
			"type": "string",
			"index": "no",
			"include_in_all": false
		},
		"rawTelephone": {
			"type": "string",
			"index": "no",
			"include_in_all": false
		},
		"telephone": {
			"type": "string",
			"copy_to": ["phonekey"],
			"index": "not_analyzed",
			"include_in_all": false
		},
		"type": {
			"type": "string",
			"index": "not_analyzed",
			"include_in_all": false
		},
		"phonekey": {
			"type": "string"
}

```

}  
}  
}  
}

Now the values of telephone is copied to "phone key" from the results of phone key the last 7 digit should only analyzed  
how to analyze it?

---

<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, 10:11pm UTC](https://discuss.elastic.co/t/analyze-only-the-last-7-digit-value-eg-telephone-number/63279/2 "2017-07-05T22:11:36Z")

</div>


