[Solr 6.6 w/SolrCloud]: Subqueries - Solr returning a 400 status code, Bad Request when attempting to use the [subquery] transformer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Solr 6.6 w/SolrCloud]: Subqueries - Solr returning a 400 status code, Bad Request when attempting to use the [subquery] transformer

Damien Hawes
Good day,

*Context and background:*

I have a set of documents, that initially are quite deeply nested, but as
part of the pre-index step the documents are flattened, such that they are
at most 2 levels deep - a root document and a list of child documents. Each
child document is given some metadata that indicates its relationship to
other child documents and the root document in the index.

*The current situation:*

There exists a request for me to produce information out of this data, but I
am attempting to return only the relevant fields in the child document(s).
My reading (here and in other sites) as lead me to believe that the [child]
transformer is ill suited for this task - feel free to correct me if I am
wrong.

It seems the [subquery] transformer is what I need, and I have read  this
thread
<http://lucene.472066.n3.nabble.com/Return-specific-field-from-child-documents-td4317774.html>  
as the post is exactly what I am trying to do

However, when I attempt to do this on my own index, Solr returns a near
useless message. Logging shows the same error.

This is my query:

/select?wt=json&indent=on&q={!parent
which=root_doc_b:true}&rows=1&fq=url:"[hidden
url]"&fq=scan_time:"2017-09-25T19:25:12Z"&fl=url,services:[subquery]&services.q={!child
of=root_doc_b:true}&services.fl=*&services.rows=1&services.fq=service:[* TO
*]

The error given to me:

{
    "error": {
        "metadata": [
            "error-class",
           
"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException",
            "root-error-class",
           
"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException"
        ],
        "msg": "Error from server at
http://solr.solr-cluster:8983/solr/scans_shard2_replica1: Bad
Request\n\nrequest:
http://solr.solr-cluster:8983/solr/scans_shard2_replica1/query",
        "code": 400
    }
}

I haven't even attempted to use the {!terms} parser with this yet.

Any assistance will be appreciated.

Regards,

Damien Hawes




--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html