# A search on more\_like\_this is not out of question

**URL:** <https://discuss.elastic.co/t/a-search-on-more-like-this-is-not-out-of-question/93325>\
**Category:** Elasticsearch\
**Created:** [July 17, 2017, 2:12am UTC](https://discuss.elastic.co/t/a-search-on-more-like-this-is-not-out-of-question/93325 "2017-07-17T02:12:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![401825317](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/401825317/32/20099_2.png) [@401825317](https://discuss.elastic.co/u/401825317)\
**Post date:** [July 17, 2017, 2:12am UTC](https://discuss.elastic.co/t/a-search-on-more-like-this-is-not-out-of-question/93325/1 "2017-07-17T02:12:49Z")

</div>

I don't know why mlk can't search for fields that I have set for another tokenizer. Here are my setting and mapping  
The ES version 5.4, IK, and Pinyin plug-ins are all 5.4, jvm1.8

PUT /testcar/  
{  
"index": {  
"analysis": {  
"analyzer": {  
"ik\_pinyin\_analyzer": {  
"type": "custom",  
"tokenizer": "ik\_smart",  
"filter": [  
"my\_pinyin",  
"word\_delimiter"  
]  
},  
"ik\_analyzer": {  
"type": "custom",  
"tokenizer": "ik\_smart",  
"filter": [  
"word\_delimiter"  
]  
}  
},  
"filter": {  
"my\_pinyin": {

```
      "type": "pinyin",
      "keep_separate_first_letter": false,
      "keep_full_pinyin": true,
      "keep_original": true,
      "limit_first_letter_length": 16,
      "lowercase": true,
      "remove_duplicated_term": true
    }
  }
}

```

}  
}  
PUT testcar/secondcar/\_mapping  
{  
"properties": {  
"kilometer": {  
"type": "float"  
},  
"title": {  
"type": "text",  
"fields": {  
"ik": {  
"type": "text",  
"analyzer": "ik\_analyzer"  
},  
"ik\_pinyin": {  
"type": "text",  
"analyzer": "ik\_pinyin\_analyzer"  
}  
}  
}  
}  
}  
PUT testcar/secondcar/1  
{  
"title":"杜卡迪"  
}  
PUT testcar/secondcar/2  
{  
"title":"杜卡迪Monster"  
}  
PUT testcar/secondcar/3  
{  
"title":"杜卡迪Monster 798"  
}  
So you can search for the results  
Query statement：

GET testcar/\_search  
{  
"query": {  
"more\_like\_this": {  
"fields": [  
"title.ik\_pinyin"  
],  
"like": "杜卡迪",  
"min\_term\_freq": 1,  
"max\_query\_terms": 12,  
"analyzer": "ik\_pinyin\_analyzer"  
}  
}  
}  
But that won't do  
Query statement：

GET testcar/\_search  
{  
"query": {  
"more\_like\_this": {  
"fields": [  
"title.ik"  
],  
"like": "杜卡迪",  
"min\_term\_freq": 1,  
"max\_query\_terms": 12,  
"analyzer": "ik\_pinyin\_analyzer"  
}  
}  
}  
Please God advice  
Please God advice  
Please God advice

---

<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:** [August 14, 2017, 2:12am UTC](https://discuss.elastic.co/t/a-search-on-more-like-this-is-not-out-of-question/93325/2 "2017-08-14T02:12:56Z")

</div>

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