# Is there a way to set analysis for a field?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-set-analysis-for-a-field/244242>\
**Category:** Elasticsearch\
**Created:** [August 8, 2020, 8:53am UTC](https://discuss.elastic.co/t/is-there-a-way-to-set-analysis-for-a-field/244242 "2020-08-08T08:53:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [August 8, 2020, 8:53am UTC](https://discuss.elastic.co/t/is-there-a-way-to-set-analysis-for-a-field/244242/1 "2020-08-08T08:53:52Z")

</div>

index mapping

[https://paste.ubuntu.com/p/9SdnNDfjM9/](https://paste.ubuntu.com/p/9SdnNDfjM9/)

I want to search for the value of productSN.  
Using the default analysis configuration, it seems that the result cannot be found.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/2/a2d7a02bcc33dfae78533a87ce4d17cc72703ced.png)

> {  
> "userType":2,  
> "productSN":"1452007220003",  
> "leadName":"叶孙达",  
> "leadPhone":"15858805027",  
> "leadProvinceId":"a60cb377-993f-e711-80cb-005056bae90b",  
> "leadCityId":"7b1199ec-9c3f-e711-80c9-005056bab658",  
> "leadCountyId":"9e4d412e-a03f-e711-80c9-005056bab658",  
> "leadAddress":"朗诗德测试",  
> "installPhotoImages":[
> 
> ```
> ]
> 
> ```
> 
> }

Fields also have this format

> ```
> "body": {
> "original": "{\"List\":[{\"NickName\":\"改变自己13998076912\",\"OpenId\":\"ocYHs4tDe2-fQvyUsVCUV9DLGok4\",\"UnionId\":\"oUNcX1nUekRgyTAG2DPjt2F0h_nQ\",\"Platform\":\"MpMall\",\"Sex\":2,\"Country\":\"中国\",\"Province\":\"辽宁\",\"City\":\"鞍山\",\"HeadImgUrl\":\"https://wx.qlogo.cn/mmopen/vi_32/OGdVxseFfkGX16BRkY1zsqywGpOt1L90UwlYKXTNhQXcNpJF94RTOPou1WNUMd8lic1e1YhQ0iaWqIrnuPt4shzA/132\",\"ContentType\":null,\"Extension\":\"\",\"ObjectKey\":\"/photo/0/2f8ab46814cb4c8497c4c911a7b5339f\",\"Domain\":\"img-cdn.lonsid.co\",\"Bucket\":\"lonsid\"}]}"
> }
> 
> ```

I'll search the OpenId value.

I feel like I need to customize an analysis and I need some suggestions.

---

<div class="post-metadata">

**Author:** ![wajika](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@wajika](https://discuss.elastic.co/u/wajika)\
**Post date:** [August 25, 2020, 7:42am UTC](https://discuss.elastic.co/t/is-there-a-way-to-set-analysis-for-a-field/244242/2 "2020-08-25T07:42:02Z")

</div>

I used the pipeline JSON processor to solve the problem

---

<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:** [September 22, 2020, 7:42am UTC](https://discuss.elastic.co/t/is-there-a-way-to-set-analysis-for-a-field/244242/3 "2020-09-22T07:42:03Z")

</div>

Closed on September 22, 2020, 7:42am UTC

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