# Stemmer with query\_string : what's the point with my config?

**URL:** <https://discuss.elastic.co/t/stemmer-with-query-string-whats-the-point-with-my-config/14227>\
**Category:** Elasticsearch\
**Created:** [November 2, 2013, 5:08pm UTC](https://discuss.elastic.co/t/stemmer-with-query-string-whats-the-point-with-my-config/14227 "2013-11-02T17:08:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tchinkatchuk](https://avatars.discourse-cdn.com/v4/letter/t/958977/32.png) [@Tchinkatchuk](https://discuss.elastic.co/u/Tchinkatchuk)\
**Post date:** [November 2, 2013, 5:08pm UTC](https://discuss.elastic.co/t/stemmer-with-query-string-whats-the-point-with-my-config/14227/1 "2013-11-02T17:08:11Z")

</div>

Hi all,

I have issues understanding my config and/or search.

I have an index created with : (curl)  
{  
"settings": {  
"index" : {  
"analysis" : {  
"analyzer" : {  
"french\_analyzer" : {  
"tokenizer" : "standard",  
"filter" : ["standard", "lowercase",  
"french\_stemmer"]  
}  
},  
"filter" : {  
"french\_stemmer" : {  
"type" : "stemmer",  
"name" : "french"  
}  
}  
}  
}  
}  
}

and after mapping is added also via curl with :  
{  
"article":  
{  
"\_all":  
{  
"enabled" : true  
},  
"\_analyzer" : {  
"default" : {  
"type" : "french\_analyzer"  
}  
},  
"properties":  
{  
"id":  
{  
"type":"long",  
"index": "no",  
"store":"no"  
},  
"slug":  
{  
"type":"string",  
"index": "not\_analyzed",  
"store":"no"  
},  
"code":  
{  
"type":"string",  
"index": "not\_analyzed",  
"store":"yes",  
"boost": 5.0  
},  
"name":  
{  
"type":"string",  
"index": "analyzed",  
"store":"yes",  
"boost": 5.0,  
"analyzer" : "french\_analyzer"  
},  
"active":  
{  
"type":"boolean",  
"index": "no",  
"store":"yes"  
},  
"suggest":  
{  
"type" :"completion",  
"index\_analyzer" : "simple",  
"search\_analyzer" : "simple"  
}  
}  
}  
}

Datas are indexed via bulk file

I am trying to do a query\_string search on x fields (not all analyzed by  
the stemmer).  
curl -XGET 'localhost:9200/quableindex\_fr\_fr/\_search?pretty=true' -d '{  
"query": {  
"query\_string": {  
"query": "encastrée",  
"fields": [  
"description",  
"name"  
],  
"analyzer" : "french\_analyzer"  
}  
},  
"sort": {  
"\_score": {  
"order": "desc"  
}  
},  
"explain": false  
}'

This is working ie. "encastrée", "encastrable" and "encastrer" are shown as  
results. (all from name field)  
But if I do not use the analyzer line in the query\_string, french stemmer  
seems not to be used (while it has been setted in mapping)  
curl -XGET 'localhost:9200/quableindex\_fr\_fr/\_search?pretty=true' -d '{  
"query": {  
"query\_string": {  
"query": "encastrée",  
"fields": [  
"description",  
"name"  
]  
}  
},  
"explain": false  
}'

Could anyone explain me ? I think I missed something.

Thanks.

Sylvain

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:09am UTC](https://discuss.elastic.co/t/stemmer-with-query-string-whats-the-point-with-my-config/14227/2 "2017-07-06T02:09:13Z")

</div>


