on 2018 Jul 02 9:04 AM
Hi experts,
I have written code as follows
final SolrQuery sq = new SolrQuery();
final String query = "(code_string:BR171 OR code_string:BR179 OR code_string:12491-4628437 OR code_string:MG1174 OR code_string:8355-6972261)&fl=code_string,name_text_en";
sq.setQuery(query);
and query is converting as
q=(code_string:BR171+OR+code_string:BR179+OR+code_string:12491-4628437+OR+code_string:MG1174+OR+code_string:8355-6972261)%26fl%3Dcode_string,name_text_en
because of that replacement for & and = with %26 and %3D, I am not getting the expected results.
How can I overcome this ?
Thanks,
Venki
Request clarification before answering.
Hi Venki,
You can try splitting up the actual query and the fields (fl). SolrQuery has a "setFields" that you can use to set a number of fields. Then you won't need & and = anymore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.