Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr Block Join Parent Query Parser range query search error

Tags:

solr

I am using Solr 6.1.0, and I'm indexing Parent-Child data into Solr.

When I do my query, I use the Block Join Parent Query Parser, to return only the parent's records, and not any of the child records, even though there might be a match in the child record.

However, I am not able to do the range query for the child record. For example, if I search with this query q= +title:join +{!parent which="content_type:parentDocument"}range_f:[2 TO 8]

I will get the following error:

{ 
  "responseHeader":{
    "zkConnected":true,
    "status":400,
    "QTime":3},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.parser.ParseException"],
    "msg":"org.apache.solr.search.SyntaxError: Cannot parse 'range_f:[2': Encountered \"<EOF>\" at line 1, column 18.\r\nWas expecting one of:\r\n    \"TO\" ...\r\n    <RANGE_QUOTED> ...\r\n    <RANGE_GOOP> ...\r\n    ",
    "code":400}}

What could be the issue here?

Regards,
Edwin

like image 548
Edwin Yeo Avatar asked Mar 03 '26 03:03

Edwin Yeo


1 Answers

Try with:

q= +title:join +_query:"{!parent which=\"content_type:parentDocument\"}range_f:[2 TO 8]"

like image 114
eglasius Avatar answered Mar 05 '26 18:03

eglasius



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!