You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Prithvi S (Jira)" <ji...@apache.org> on 2026/09/04 21:42:00 UTC
[jira] [Updated] (SOLR-18421) Expose Lucene ParentsChildrenBlockJoinQuery from {!child} (parent+child query, childLimit per parent)
[ https://issues.apache.org/jira/browse/SOLR-18421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Prithvi S updated SOLR-18421:
-----------------------------
Description:
Lucene 10.4 added ParentsChildrenBlockJoinQuery (https://github.com/apache/lucene/issues/14565): match parent docs and child docs in the same block-join query, with an optional childLimitPerParent cap.
Solr already depends on Lucene 10.4.0 (gradle/libs.versions.toml) and already wraps ToParentBlockJoinQuery / ToChildBlockJoinQuery as \{!parent} / \{!child}, but never uses ParentsChildrenBlockJoinQuery.
*Current limitation*
{!child} takes a parent query and returns *all* children of those parents. There is no way to:
* also filter which children match
* cap the number of matching children per parent at *query* time
The [child] transformer \{{limit}} param is response decoration of already-matched parents, not a search-time limit.
*Proposed API (backward compatible)*
{code:java}
q=\{!child parentPath="/" childQuery=$cq childLimit=2}title:solr
&cq=comments:lucene
{code}
Omit childQuery/childLimit -> existing \{!child} behavior.
was:
Lucene 10.4 added ParentsChildrenBlockJoinQuery (GITHUB#14565): match parent docs and child docs in the same block-join query, with an optional childLimitPerParent cap.
Solr already depends on Lucene 10.4.0 (gradle/libs.versions.toml) and already wraps ToParentBlockJoinQuery / ToChildBlockJoinQuery as \{!parent} / \{!child}, but never uses ParentsChildrenBlockJoinQuery.
*Current limitation*
{!child} takes a parent query and returns *all* children of those parents. There is no way to:
* also filter which children match
* cap the number of matching children per parent at *query* time
The [child] transformer \{{limit}} param is response decoration of already-matched parents, not a search-time limit.
*Proposed API (backward compatible)*
{code:java}
q=\{!child parentPath="/" childQuery=$cq childLimit=2}title:solr
&cq=comments:lucene
{code}
Omit childQuery/childLimit -> existing \{!child} behavior.
> Expose Lucene ParentsChildrenBlockJoinQuery from {!child} (parent+child query, childLimit per parent)
> ------------------------------------------------------------------------------------------------------
>
> Key: SOLR-18421
> URL: https://issues.apache.org/jira/browse/SOLR-18421
> Project: Solr
> Issue Type: New Feature
> Components: query parsers
> Reporter: Prithvi S
> Priority: Major
>
> Lucene 10.4 added ParentsChildrenBlockJoinQuery (https://github.com/apache/lucene/issues/14565): match parent docs and child docs in the same block-join query, with an optional childLimitPerParent cap.
> Solr already depends on Lucene 10.4.0 (gradle/libs.versions.toml) and already wraps ToParentBlockJoinQuery / ToChildBlockJoinQuery as \{!parent} / \{!child}, but never uses ParentsChildrenBlockJoinQuery.
> *Current limitation*
> {!child} takes a parent query and returns *all* children of those parents. There is no way to:
> * also filter which children match
> * cap the number of matching children per parent at *query* time
> The [child] transformer \{{limit}} param is response decoration of already-matched parents, not a search-time limit.
> *Proposed API (backward compatible)*
> {code:java}
> q=\{!child parentPath="/" childQuery=$cq childLimit=2}title:solr
> &cq=comments:lucene
> {code}
> Omit childQuery/childLimit -> existing \{!child} behavior.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org