# Search based on joining Tokens

**URL:** https://discuss.elastic.co/t/search-based-on-joining-tokens/28991
**Category:** Elasticsearch
**Created:** [September 10, 2015, 7:10am UTC](https://discuss.elastic.co/t/search-based-on-joining-tokens/28991 "2015-09-10T07:10:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![krish0608](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krish0608/32/6797_2.png) [@krish0608](https://discuss.elastic.co/u/krish0608)
#### Post date: [September 10, 2015, 7:10am UTC](https://discuss.elastic.co/t/search-based-on-joining-tokens/28991/1 "2015-09-10T07:10:07Z")

</div>

PUT /demo  
{  
"settings":{  
"analysis": {  
"analyzer": {  
"xanalyzer": {  
"type": "custom",  
"tokenizer": "lowercase",  
"filter": [  
"mystopwords"  
]  
}},  
"filter": {  
"mystopwords": {  
"type": "stop",  
"stopwords":"the"  
}  
}  
}  
},  
"mappings": {  
"post" : {  
"properties" : {  
"title" : { "type" : "string", "analyzer" : "xanalyzer", "tokenizer": "lowercase", "filter": [  
"mystopwords"  
] }  
}  
}  
}  
}  
PUT /demo/post/2  
{  
"title":"betaout is the kk krishna"  
}  
PUT /demo/post/1  
{  
"title":"kk the krishna"  
}

GET /demo/post/\_search  
{  
"query":{"match":{"title":"kk krishna"}}  
}

I want result only the when i search it with kk krishna...not when i search it with "kk the krishna"..plzz suggest me some suggestion.

---

<div class="post-metadata">

### Author: ![javanna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javanna/32/4698_2.png) [@javanna](https://discuss.elastic.co/u/javanna)
#### Post date: [September 10, 2015, 4:52pm UTC](https://discuss.elastic.co/t/search-based-on-joining-tokens/28991/2 "2015-09-10T16:52:27Z")

</div>

seems like you want to look for a phrase, meaning that you care about the position of the terms, not only about whether they appear or not. Try add the type:phrase to the match query I'd say.

---

<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, 11:51pm UTC](https://discuss.elastic.co/t/search-based-on-joining-tokens/28991/3 "2017-07-05T23:51:08Z")

</div>


