Just use the edismax query parser and set "qf" to all of the searchable
first, in both languages. And then just use <copyField> to copy from the
main field(s) to the parallel, alternate language fields.
-- Jack Krupansky
-----Original Message-----
From: Shalom Ben-Zvi Kazaz
Sent: Sunday, July 07, 2013 12:29 PM
To: solr-user@lucene.apache.org
Subject: searching both english and japanese
Hi,
We have a customer that needs support for both english and japanese, a
document can be any of the two and we have no indication about the
language for a document. ,so I know I can construct a schema with both
english and japanese fields and index them with copy field. I also know
I can detect the language and index only the relevant fields but I want
to support mixed language documents so I think I need to index to both
english and japanese fields. we are using the standard request handler
no dismax and we want to keep using it as our queries should be on
certain fields with no errors.
queries are user entered and can be any valid query like q=lexmark or
q=docname:lexmark AND content:printer , now what I think I want is to
add the japanese fields to this query and end up with "q=docname:lexmark
OR docname_ja:lexmark" or "q=(docname:lexmark AND content:printer) OR
(docname_ja:lexmark AND content_ja:printer) " . of course I can not ask
the use to do that. and also we have only one default field and it must
be japanese or english but not both. I think the default field can be
solved by using dixmax and specify multi default fields with qt, but we
don't use dismax.
we use solrj as our client and It would be better if I could do
something in the client side and not in solr side.
any help/idea is appreciated. ?