You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexandre Rafalovitch (JIRA)" <ji...@apache.org> on 2016/10/01 15:55:20 UTC
[jira] [Commented] (SOLR-9263) New Admin gui fails to parse local
params in the "Raw Query Parameters" query field
[ https://issues.apache.org/jira/browse/SOLR-9263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15538720#comment-15538720 ]
Alexandre Rafalovitch commented on SOLR-9263:
---------------------------------------------
Is this the same as SOLR-8596 that was fixed for Solr 6.2?
> 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
> Attachments: SOLR-9263.patch
>
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org