We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In var searchParams = "q=*:*&fl=name,id&wt=json&fq=classification:content-type&fq=name:" + contentTypeName;
var searchParams = "q=*:*&fl=name,id&wt=json&fq=classification:content-type&fq=name:" + contentTypeName;
the value of the fq parameter needs to be escaped:
fq
For Solr escaping the is no standard javascript method afaik, the equivalent java code is:
private static final String escapeQueryChars(final String s) { final StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); // These characters are part of the query syntax and must be escaped if ((c == '\\') || (c == '+') || (c == '-') || (c == '!') || (c == '(') || (c == ')') || (c == ':') || (c == '^') || (c == '[') || (c == ']') || (c == '\"') || (c == '{') || (c == '}') || (c == '~') || (c == '*') || (c == '?') || (c == '|') || (c == '&') || (c == ';') || (c == '/') || Character.isWhitespace(c)) { sb.append('\\'); } sb.append(c); } return sb.toString(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In
var searchParams = "q=*:*&fl=name,id&wt=json&fq=classification:content-type&fq=name:" + contentTypeName;
the value of the
fq
parameter needs to be escaped:For Solr escaping the is no standard javascript method afaik, the equivalent java code is:
The text was updated successfully, but these errors were encountered: