You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Danilo Tomasoni <to...@cosbi.eu> on 2020/04/07 09:02:05 UTC

different interpretation of the same query between solr 7.3.1 and solr 8.4.1

Hello all,
I noticed that solr8 parses the edismax queries differently from solr7.

the querystring and parsedquery in solr 8.4.1 are

"querystring":"(_query_:\"{!edismax qf='titles subtitles study_brief_title abstracts abstract_background abstract_objective abstract_methods abstract_results abstract_conclusions abstract_other_nasa abstract_other_kie abstract_other_aids abstract_other_aamc abstract_other_publisher abstract_other_pip abstract_other_plain_language_summary keywords medline_chemical_terms medline_mesh_terms' q.op=OR mm=1 v=$subquery1}\" AND (f2:(\"pharmacokinetics\")))",


"parsedquery":"+(DisjunctionMaxQuery(((abstracts_chemical_pubtator_annotation_terms:_query_)^7.0 | (body_nonstandard_species_gnorm_annotation_canonical_terms:_query_)^7.0 | (body_conclusions_species_gnorm_annotation_canonical_terms:_query_)^7.0 | (intervention_model_chemical_tmchemm2_annotation_terms:_query_)^7.0 | ...


that looks like a syntax error ( notice that field:_query_ )

while in solr 7.3.1 the querystring and parsedquery are

"querystring":"(_query_:\"{!edismax qf='titles subtitles study_brief_title abstracts abstract_background abstract_objective abstract_methods abstract_results abstract_conclusions abstract_other_nasa abstract_other_kie abstract_other_aids abstract_other_aamc abstract_other_publisher abstract_other_pip abstract_other_plain_language_summary keywords medline_chemical_terms medline_mesh_terms' q.op=OR mm=1 v=$subquery1}\" AND (f2:(\"pharmacokinetics\")))",


"parsedquery":"+(+(+(DisjunctionMaxQuery((subtitles:rifampicin | abstract_methods:rifampicin | abstract_other_plain_language_summary:rifampicin | abstract_other_pip:rifampicin | keywords:rifampicin | abstracts:rifampicin | abstract_background:rifampicin | medline_chemical_terms:rifampicin | ....

that is correct.

please note also that subquery1 is

"subquery1":"(rifampicin rifampin isoniazid pyrazinamide ethambutol moxifloxacin pretomanid bedaquiline)"


and that df is a very big list of fields.



I attach an example POST request.

I executed the test with curl, this is the command line

(solr 7.3.1)
curl -X POST -H "Content-type: application/x-www-form-urlencoded" --data @request "http://solr2.cosbi.eu/solr/COSBIBioIndex/select?indent=off&wt=json&rows=1&debugQuery=true"

(solr 8.4.1)
curl -X POST -H "Content-type: application/x-www-form-urlencoded" --data @request "http://solr-test.cosbi.eu/solr/COSBIBioIndex/select?indent=off&wt=json&rows=1&debugQuery=true"


Any clue on why this is happening? It seems to me that there should be an obvious change in syntax that I can't find in the documentation and relase notes.
Thank you

Danilo Tomasoni

Fondazione The Microsoft Research - University of Trento Centre for Computational and Systems Biology (COSBI)
Piazza Manifattura 1,  38068 Rovereto (TN), Italy
tomasoni@cosbi.eu<https://webmail.cosbi.eu/owa/redir.aspx?C=VNXi3_8-qSZTBi-FPvMwmwSB3IhCOjY8nuCBIfcNIs_5SgD-zNPWCA..&URL=mailto%3acalabro%40cosbi.eu>
http://www.cosbi.eu<https://webmail.cosbi.eu/owa/redir.aspx?C=CkilyF54_imtLHzZqF1gCGvmYXjsnf4bzGynd8OXm__5SgD-zNPWCA..&URL=http%3a%2f%2fwww.cosbi.eu%2f>

As for the European General Data Protection Regulation 2016/679 on the protection of natural persons with regard to the processing of personal data, we inform you that all the data we possess are object of treatment in the respect of the normative provided for by the cited GDPR.
It is your right to be informed on which of your data are used and how; you may ask for their correction, cancellation or you may oppose to their use by written request sent by recorded delivery to The Microsoft Research – University of Trento Centre for Computational and Systems Biology Scarl, Piazza Manifattura 1, 38068 Rovereto (TN), Italy.
P Please don't print this e-mail unless you really need to