I'm not familiar with the platform, but the documentation seems to suggest that brackets are only included around values if you are using OR
or AND
to search for multiple values. Try using year: 2013
instead of year:( 2013 )
, or sbu: "Special Bictums Unit"
instead of sbu:("Special Bictums Unit")
.
Also, there seem to be additional spaces around your search queries. I don't suspect that is a problem, but you can call trim()
on the string to return a version without these, i.e. q = q.trim();
.
From the documentation:
If you are searching for an atom field that contains whitespace or special characters, enclose the value in quotes.
To search for an ampersand, it would seem you would need to enclose it in quotes, e.g. "&"
. However, you cannot search for just a part of an atom field:
The only valid relational operator for atom fields is the equality operator. The complete contents of an atom field must match the query value.
If you want to find all fields containing an ampersand somewhere in them, they must be text or HTML fields. Presumably the rule about special characters and quotes applies to these as well.