[ 
https://issues.apache.org/jira/browse/SOLR-12303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465449#comment-16465449
 ] 

Munendra S N commented on SOLR-12303:
-------------------------------------

[^SOLR-12303.patch]
[~mkhludnev]
Using request.getPath(). Also, handled the special case for 
handleSelect=true(javadoc might need to be improved for getParentPath()).
Failing test is passing now
{code:java}
  /**
   *
   * {@link CommonParams#PATH} is given more priority than {@link 
CommonParams#QT}
   * When handleSelect=true and /select handler is not configured then path 
would be
   * picked from {@link CommonParams#QT}
   * When handleSelect=false and /select is not configured, request would not 
reach subquery
   * transformer. (main query itself would fail)
   * @return main query's path
   */
  private String getParentPath() {
    String path = request.getPath();
    SolrRequestHandler handler = request.getCore().getRequestHandler(path); // 
didn't find other ways to check if handler is configured for the path or not
    if (handler != null) {
      return path;
    }
    return request.getParams().get(CommonParams.QT);
  }
{code}


> Subquery Doc transform doesn't inherit path from original request
> -----------------------------------------------------------------
>
>                 Key: SOLR-12303
>                 URL: https://issues.apache.org/jira/browse/SOLR-12303
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Munendra S N
>            Assignee: Mikhail Khludnev
>            Priority: Major
>         Attachments: SOLR-12303.patch, SOLR-12303.patch, SOLR-12303.patch, 
> SOLR-12303.patch, SOLR-12303.patch, SOLR-12303.patch, SOLR-12303.patch
>
>
> {code:java}
> localhost:8983/solr/k_test/search?sort=score desc,uniqueId 
> desc&q.op=AND&wt=json&q={!parent which=parent_field:true score=max}({!edismax 
> v=$origQuery})&facet=false&fl=uniqueId&fl=score&fl=_children_:[subquery]&fl=uniqueId&origQuery=false&qf=parent_field&_children_.fl=uniqueId&_children_.fl=score&_children_.rows=3&spellcheck=false&_children_.q={!edismax
>  qf=parentId v=$row.uniqueId}&rows=1
> {code}
> For this request, even though the path is */search*, the subquery request 
> would be fired on handler */select*.
> Subquery request should inherit the parent request handler and there should 
> be an option to override this behavior. (option to override is already 
> available by specifying *qt*)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to