Hi all, I'm using Solr 4.7.2 to implement multilingual search in my application.
I have a need to pass in query locale on search request and to choose between custom tokenizers dynamically based on provided locale value. In Solr In Action - Chapter 14 (Multilingual Search), Listing 14.9 - *Indexing and querying multiple languages within the same field* MultiFieldTextTokenizer allow specifying query language as a prefix to the terms that goes into the analyzer. For example: q=en,fr,es|abandon AND en,fr,es|understanding AND en,fr,es|sagess. >From one side I have only one language per query, and from the other side I allow users to use Lucene query syntax in queries including multi-term queries. Therefore it seems that I have to do the nontrivial work of parsing the user query according to the query parser rules and add the prefix everywhere it's needed. For example consider this user entered query: *one AND (two OR field2:three)* This will need to be non-trivially translated into: *en:one AND (en:two OR field2:en|three). * Is there other conventional way to pass in language string (one per search request) to query analyzer/tokenizer ? Thanks in advance, Michael