Hi Lisheng,

We did something similar in Solr using a custom handler (but I think you could 
just build a custom QeryParser to do this), but you could do this in your 
application as well, ie, get the language and then rewrite your query to use 
the language specific fields. Come to think of it, the QueryParser would 
probably be sufficiently general to qualify as a patch for custom functionality.

-sujit

On Apr 8, 2013, at 12:28 PM, Zhang, Lisheng wrote:

> 
> Hi,
> 
> I found that in solr we need to define a special fieldType for each
> language (http://wiki.apache.org/solr/UnicodeCollation), then point
> a field to this type.
> 
> But in our application one field (like 'title') can be used by various
> users for their languages (user1 used for English, user2 used it for
> Japanese ..), so it is even difficult for us to use dynamical field,
> we would prefer to pass in a parameter like 
> 
> language = 'en'
> 
> at run time, then solr API may use this parameter to call lucene API
> to sort a field. This approach would be much more flexible (we programmed
> this way when using lucene directly)?
> 
> Thanks very much for helps, Lisheng

Reply via email to