Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
6.0.1
-
None
-
None
Description
Including any local params in the "Raw Query Parameters" query field, such as for a rerank query
rq={!rerank reRankQuery=$rqq reRankDocs=1000 reRankWeight=3}&rqq=(hi+hello+hey+hiya)
results in an error:
org.apache.solr.common.SolrException: org.apache.solr.search.SyntaxError: Expected identifier at pos 20 str='{!rerank reRankQuery' at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:219)
It's clear that the resulting URL is malformed:
http://localhost:8983/solr/collection1/select?fl=name,%20score&indent=on&q=greetings&rq={!rerank%20reRankQuery&rqq=(hi+hello+hey+hiya)&wt=json
This appears to be due to javascript code naively splitting on '='.
/solr/webapp/web/js/angular/controllers/query.js
if ($scope.rawParams) { var rawParams = $scope.rawParams.split(/[&\n]/); for (var i in rawParams) { var param = rawParams[i]; var parts = param.split("="); } }
I've attached a possible patch.
Attachments
Attachments
Issue Links
- duplicates
-
SOLR-8596 Web UI doesn't correctly generate queries which include local parameters
- Closed