# Language specific analyzer in the query

**URL:** <https://discuss.elastic.co/t/language-specific-analyzer-in-the-query/23045>\
**Category:** Elasticsearch\
**Created:** [April 1, 2015, 5:40pm UTC](https://discuss.elastic.co/t/language-specific-analyzer-in-the-query/23045 "2015-04-01T17:40:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumatheja](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@sumatheja](https://discuss.elastic.co/u/sumatheja)\
**Post date:** [April 1, 2015, 5:40pm UTC](https://discuss.elastic.co/t/language-specific-analyzer-in-the-query/23045/1 "2015-04-01T17:40:24Z")

</div>

Hi,

I have a document with different text fields. For example I have a text  
field for french text (text\_fr) which has a french analyzer set in the  
mapping. Once the indexing is done and I try to query the; field specific  
(text\_fr:"xyz") querying works well with fuzziness (searching for word  
"person" will return the documents with "personne"). However if I do a all  
search with "person" it doesn't return anything. I tried applying french  
analyzer for the query but no results.

Any pointers to what I am missing will be of great help.

Cheers

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/4d38596f-6ceb-45ec-923c-885b82320f06%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4d38596f-6ceb-45ec-923c-885b82320f06%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![sumatheja](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@sumatheja](https://discuss.elastic.co/u/sumatheja)\
**Post date:** [April 1, 2015, 6:12pm UTC](https://discuss.elastic.co/t/language-specific-analyzer-in-the-query/23045/2 "2015-04-01T18:12:26Z")

</div>

For example,

I have a field named text\_fr (french analyzed), when I search with:

{  
"query": {  
"query\_string": {  
"query": "person",  
"\_name": "person",  
"analyzer": "french"  
}  
}  
}

I dont get any results. However if I search with

{  
"query": {  
"query\_string": {  
"query": "text\_fr:person",  
"\_name": "text\_fr:person"  
}  
}  
}

Is there a away I can retrieve the documents with "personne" (documents  
retrieved in the second query) by using all (not field specific) query.  
Hope this adds more info on my use case.  
On Wednesday, April 1, 2015 at 10:40:24 AM UTC-7, werewolf420 wrote:

> Hi,
> 
> I have a document with different text fields. For example I have a text  
> field for french text (text\_fr) which has a french analyzer set in the  
> mapping. Once the indexing is done and I try to query the; field specific  
> (text\_fr:"xyz") querying works well with fuzziness (searching for word  
> "person" will return the documents with "personne"). However if I do a all  
> search with "person" it doesn't return anything. I tried applying french  
> analyzer for the query but no results.
> 
> Any pointers to what I am missing will be of great help.
> 
> Cheers

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/60be99e5-575a-477d-ae6c-f699bd643bae%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/60be99e5-575a-477d-ae6c-f699bd643bae%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Asimov4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asimov4/32/44783_2.png) [@Asimov4](https://discuss.elastic.co/u/Asimov4)\
**Post date:** [April 3, 2015, 3:57pm UTC](https://discuss.elastic.co/t/language-specific-analyzer-in-the-query/23045/3 "2015-04-03T15:57:49Z")

</div>

I was able to repro that. It looks like the "analyzer" attribute is not  
picked up by the "query\_string" query.  
Any thoughts? Should we create a github issue?

On Wednesday, April 1, 2015 at 11:12:26 AM UTC-7, werewolf420 wrote:

> For example,
> 
> I have a field named text\_fr (french analyzed), when I search with:
> 
> {  
> "query": {  
> "query\_string": {  
> "query": "person",  
> "\_name": "person",  
> "analyzer": "french"  
> }  
> }  
> }
> 
> I dont get any results. However if I search with
> 
> {  
> "query": {  
> "query\_string": {  
> "query": "text\_fr:person",  
> "\_name": "text\_fr:person"  
> }  
> }  
> }
> 
> Is there a away I can retrieve the documents with "personne" (documents  
> retrieved in the second query) by using all (not field specific) query.  
> Hope this adds more info on my use case.  
> On Wednesday, April 1, 2015 at 10:40:24 AM UTC-7, werewolf420 wrote:
> 
> > Hi,
> > 
> > I have a document with different text fields. For example I have a text  
> > field for french text (text\_fr) which has a french analyzer set in the  
> > mapping. Once the indexing is done and I try to query the; field specific  
> > (text\_fr:"xyz") querying works well with fuzziness (searching for word  
> > "person" will return the documents with "personne"). However if I do a all  
> > search with "person" it doesn't return anything. I tried applying french  
> > analyzer for the query but no results.
> > 
> > Any pointers to what I am missing will be of great help.
> > 
> > Cheers

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f8d076ce-08ca-479f-974d-4dc0b498e386%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f8d076ce-08ca-479f-974d-4dc0b498e386%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:21am UTC](https://discuss.elastic.co/t/language-specific-analyzer-in-the-query/23045/4 "2017-07-06T00:21:49Z")

</div>


