I really have to ask why you want to search for apostrophes. Usually these are considered junk characters and are best ignored.
Best, Erick On Tue, Jun 17, 2014 at 6:03 AM, Shawn Heisey <s...@elyograg.org> wrote: > On 6/16/2014 11:34 PM, Gaurav Deshpande wrote: >> I want to perform name searches in Solr on String and text datatypes but >> names contain apostrophes in it. >> >> Is there a way I can escape these apostrophes and perform searches ? >> >> Using '\' before apostrophe results in forbidden access due to cross site >> scripting attacks. >> >> Any help or pointers regarding this would be appreciated. > > If I start up the Solr example from branch_4x and send the following query: > > text:\' > > Solr will not complain at all. I would bet that you have a proxy or a > load balancer in front of Solr that is treating your input as a possible > attack and denying it. You would need to look into the configuration of > the proxy or load balancer to fix this. > > It is entirely possible that you have a proxy on your network that you > are not aware of. Sometimes large companies will send *all* > user-generated network traffic through a proxy to check for viruses, > trojans, and illegal/objectionable network usage. > > Thanks, > Shawn >