# Query\_string multi field multi analyzers howto

**URL:** <https://discuss.elastic.co/t/query-string-multi-field-multi-analyzers-howto/3641>\
**Category:** Elasticsearch\
**Created:** [December 8, 2010, 3:42am UTC](https://discuss.elastic.co/t/query-string-multi-field-multi-analyzers-howto/3641 "2010-12-08T03:42:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Gavarini](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sebastian\_Gavarini](https://discuss.elastic.co/u/Sebastian_Gavarini)\
**Post date:** [December 8, 2010, 3:42am UTC](https://discuss.elastic.co/t/query-string-multi-field-multi-analyzers-howto/3641/1 "2010-12-08T03:42:06Z")

</div>

Hi all,

I am trying to understand how to implement a query with multiple  
analyzers against query\_string's parsing. I have seen you can pass  
many fields, with boosts for each, to query\_string, also you can pass  
an analyzer. What I don't know how to do is to pass many analyzers, or  
a by-field analyzer, I have seen a FieldNameAnalyzer, but it isn't  
explained in the Analyzers documentation, and probably isn't meant to  
be used by clients.

My use case consists with say two fields, "title" and "description",  
each with different analyzers. "title" uses a compile-time known  
analyzer, but "description" depends on the locale (for stop words  
removal), so it's only run-time known, and even then, it uses a  
different set of token filters and tokenizer (description is a longer  
field, a little less important, and so I do less data cooking with  
it).

So, how can I let query\_string know the analyzers I need for each  
field? In my mappings I already added the analyzer for "title", but I  
ues the "\_analyzer" parameter for indexing time in "description". I  
need a way to tell the same thing at search time, to tell "title" with  
"analyzer1" and "description" with "analyzer2\_en\_GB" for example.

I could ignore query\_string altogether and do all it's work in  
client's code, building the query myself, but I would like to know if  
there is a better way.

Thanks,  
Sebastian.

---

<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, 4:15am UTC](https://discuss.elastic.co/t/query-string-multi-field-multi-analyzers-howto/3641/2 "2017-07-06T04:15:34Z")

</div>


