Solr answer with an error when fq parameters has fields with white spaces
Issue #31
new
I have changed in my local solr.js the following to solve the problem. The following modification means for managing white spaces inside fields for fq parameters. After encodeURI fq=Part1 part2 becomes fq=Part1%20part2 but solr answer with error. Then white spaces must start with a backslash such that fq=Part1\%20part2
Best regards
/**
* Get the fully specified Solr query URL.
*/
self.getSolrQueryUrl = function() {
/*The following modification means for managing white spaces inside fields for fq parameters. After encodeURI fq=Part1 part2 becomes
fq=Part1%20part2 but solr answer with error. Then white spaces must start with a backslash such that fq=Part1\%20part2*/
var t=self.solr + "/select?" + encodeURI(self.getQuery());
return t.replace(/fq=(\w+)%20/g, "fq=$1\\%20" )
//return self.solr + "/select?" + encodeURI(self.getQuery());
};
I have upgraded this issue because white spaces can appear multiple times into fields, so the above method as been changed with the following: