At glance, AND requires both subqueries to match and OR accepts even only one of them. So, the part of the query, which you *don't* see in expalinOther, kicks out the doc from the AND query results.
On Wed, Oct 8, 2025 at 11:49 AM Danilo Tomasoni <[email protected]> wrote: > Thank you Mikhail, > your changes made a lot of sense. > > I removed the extra df parameter, and nothing changed w.r.t. the query > results (but I saved some bytes) > I changed the main AND with an OR and now I get the response I was looking > for, > you can see it attached , it's the output of > > $ jq -r '.debug.explainOther.PUBMEDPMID35868042' explain_response.json > > So the question now is, *why if it is an AND I don't get the same answer*? > > With the OR query, this document is in the result set, while it's not with > the original AND query. > > Thank you very much for your help. > Danilo > > <https://www.cosbi.eu/> > > Danilo Tomasoni > > Data Scientist & Software Engineer > Intelligent systems for Computational Biology > +39 0464 808845 > > [email protected] > > www.cosbi.eu > > <https://twitter.com/FoundationCosbi/> > <https://www.linkedin.com/company/cosbi/> > > ------------------------------ > *Da:* Mikhail Khludnev <[email protected]> > *Inviato:* martedì 7 ottobre 2025 19:06 > *A:* [email protected] <[email protected]> > *Oggetto:* Re: Explain of explainOther > > [CAUTION: EXTERNAL SENDER] > [Please check correspondence between Sender Display Name and Sender Email > Address before clicking on any link or opening attachments] > > Hello Danilo > It's really long to analyze. A few thoughts: > - it seems like the query consist of two main subqueries combined by AND. > Just for experiment, can you change it to OR? Providing the response "No > matching clauses" neither of them matches. If it's true, you may drill down > them one by one. > - I spotted many fields under df param. But it's qf syntax, df accepts > single field and handled by standard parser. > -- > Mikhail > > On Tue, Oct 7, 2025 at 11:01 AM Danilo Tomasoni <[email protected]> wrote: > > I have a complex query with edismax parser, involving several subqueries. > I attach a readable version of it. > > I want to use the debugQuery=on and explainOther parameters to understand > why a given id didn't match. > I expect to see something like "CTSS was in title, but you required also > other conditions that are not met" > and I like to know which one of the conditions was not met for my document. > > To debug, I performed this query with curl like this > > curl -X POST --data @payload.txt " > https://mysolr/jupiter/select?wt=json&rows=0&indent=off&debugQuery=on&explainOther=id%3APUBMEDPMID35868042 > " > > where payload.txt is attached (the urlencoded version of readable query > basically) > > If I look at the response (explain_response.json attached) I see: > ... > "PUBMEDPMID35868042": "\n0.0 = No matching clauses\n" > ... > > Even if I run this other query: > > id:PUBMEDPMID35868042 AND titles:ctss > > returns the document, and this is a partial match in subquery9, so I > should have at least a matching clause. > > Can you tell me what's wrong in my reasoning? > thank you very much. > > Danilo > > > <https://www.cosbi.eu/> > > Danilo Tomasoni > > Data Scientist & Software Engineer > Intelligent systems for Computational Biology > +39 0464 808845 > > [email protected] > > www.cosbi.eu > > <https://twitter.com/FoundationCosbi/> > <https://www.linkedin.com/company/cosbi/> > > > > -- > Sincerely yours > Mikhail Khludnev > -- Sincerely yours Mikhail Khludnev
