[
https://issues.apache.org/jira/browse/SOLR-8208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mikhail Khludnev updated SOLR-8208:
-----------------------------------
Attachment: SOLR-8208.patch
attaching an implementation with multivalue fix and tests.
Reveal a potential usability usage: Implicit subquery params (doc values) are
not logged:
{noformat}
params={q=name_s:dave&subq1.rows=6&indent=true&fl=*,depts:[subquery+prefix%3Dsubq1+separator%3D"+"]&rows=3&subq1.indent=true&wt=xml&subq1.fl=text_t&subq1.q={!lucene+df%3Ddept_id_s+v%3D$subq1.row.dept_ss_dv}}
hits=3 status=0 QTime=2
params={rows=6&indent=true&fl=text_t&q={!lucene+df%3Ddept_id_s+v%3D$subq1.row.dept_ss_dv}}
hits=6 status=0 QTime=4
params={rows=6&indent=true&fl=text_t&q={!lucene+df%3Ddept_id_s+v%3D$subq1.row.dept_ss_dv}}
hits=6 status=0 QTime=7
params={rows=6&indent=true&fl=text_t&q={!lucene+df%3Ddept_id_s+v%3D$subq1.row.dept_ss_dv}}
hits=6 status=0 QTime=10
{noformat}
the first line is a main query, and the latter are subqueries. here you see
that and actual value of {{subq1.row.dept_ss_dv}} are not logged, but it might
by deadly needful.
What's you prefer tweak params somehow for logging, or {{allow
debugQuery=true}} for subqueries, and inject it into main query debug?
> DocTransformer executes sub-queries
> -----------------------------------
>
> Key: SOLR-8208
> URL: https://issues.apache.org/jira/browse/SOLR-8208
> Project: Solr
> Issue Type: Improvement
> Reporter: Mikhail Khludnev
> Assignee: Mikhail Khludnev
> Labels: features, newbie
> Attachments: SOLR-8208.diff, SOLR-8208.patch, SOLR-8208.patch,
> SOLR-8208.patch, SOLR-8208.patch, SOLR-8208.patch, SOLR-8208.patch,
> SOLR-8208.patch, SOLR-8208.patch
>
>
> The initial idea was to return "from" side of query time join via
> doctransformer. I suppose it isn't query-time join specific, thus let to
> specify any query and parameters for them, let's call them sub-query. But it
> might be problematic to escape subquery parameters, including local ones,
> e.g. what if subquery needs to specify own doctransformer in &fl=\[..\] ?
> I suppose we can allow to specify subquery parameter prefix:
> {code}
> ..&fl=id,[subquery paramPrefix=subq1.
> fromIndex=othercore],score,..&subq1.q={!term f=child_id
> v=$subq1.row.id}&subq1.rows=3&subq1.sort=price&..
> {code}
> * {{paramPrefix=subq1.}} shifts parameters for subquery: {{subq1.q}} turns to
> {{q}} for subquery, {{subq1.rows}} to {{rows}}
> * {{fromIndex=othercore}} optional param allows to run subquery on other
> core, like it works on query time join
> * the itchiest one is to reference to document field from subquery
> parameters, here I propose to use local param {{v}} and param deference
> {{v=$param}} thus every document field implicitly introduces parameter for
> subquery $\{paramPrefix\}row.$\{fieldName\}, thus above subquery is
> q=child_id:<doc.getField("id")>, presumably we can drop "row." in the middle
> (reducing to v=$subq1.id), until someone deal with {{rows}}, {{sort}} fields.
> * \[subquery\], or \[query\], or ?
> Caveat: it should be a way slow; it handles only search result page, not
> entire result set.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]