> I am trying to get filter querying to work on search.
> When the filter query contains no special character or is a
> single word the
> filter query parameter returns the result as expected.
> However when I run filter query where special characters
> are present no
> results are results.
> 
> e.g Cameras & Photos, I removed the & character as
> well (Cameras and Photos)
> and still no results are returned.
> 
> However for a string like Electronics the results are
> returned as expected.
> 
> I am using the string field to store and index the field
> that I want to
> filter and SolrJ as the client.
> 
> From the documentation I read solrJ automatically escapes
> special
> characters.

With SolrJ you don't need to urlencode. However you still need to escape 
special query syntax parameters. Can you try this:

SolrQuery.addFilterQuery("yourStringField:Cameras\\ \\&\\ Photos")


      

Reply via email to