Brian Sawyer created SOLR-9263:
----------------------------------
Summary: New Admin gui fails to parse local params in the "Raw
Query Parameters" query field
Key: SOLR-9263
URL: https://issues.apache.org/jira/browse/SOLR-9263
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Components: web gui
Affects Versions: 6.0.1
Reporter: Brian Sawyer
Including any local params in the "Raw Query Parameters" query field, such as
for a rerank query
{noformat}rq={!rerank reRankQuery=$rqq reRankDocs=1000
reRankWeight=3}&rqq=(hi+hello+hey+hiya){noformat} results in an error:
{noformat}
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)
{noformat}
It's clear that the resulting URL is malformed:
{noformat}
http://localhost:8983/solr/collection1/select?fl=name,%20score&indent=on&q=greetings&rq={!rerank%20reRankQuery&rqq=(hi+hello+hey+hiya)&wt=json
{noformat}
This appears to be due to javascript code naively splitting on '='.
/solr/webapp/web/js/angular/controllers/query.js
{code}
if ($scope.rawParams) {
var rawParams = $scope.rawParams.split(/[&\n]/);
for (var i in rawParams) {
var param = rawParams[i];
var parts = param.split("=");
}
}
{code}
I've attached a possible patch.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]