0

I need to do SOLR search for text like "C++" which contains "+" within it. tried to escape the "+" but even thought its not fetching the results. Instead its matches for only "C". Is there a way to include "+" as a search criteria and get the exact result ?

  • Possible duplicate of [Which special characters need escaping in a solr query?](https://stackoverflow.com/questions/21914956/which-special-characters-need-escaping-in-a-solr-query) – zyndor Dec 29 '17 at 11:03
  • There is no solution on how to escape "+" special character within field query. I know that special character needs to be escaped but even though for + , its not working. – Aman Diwakar Dec 29 '17 at 11:25
  • I'm no Lucene expert by any standard, but the linked question has an accepted answer pointing to the Lucene docs, which have a section about escaping special characters that are part of the query syntax. – zyndor Dec 29 '17 at 11:30
  • Thanks @zyndor, but that doesnt resolve my issue. – Aman Diwakar Dec 29 '17 at 11:43
  • What have you tried? What is the definition of the field? If the field definition splits / replaces on non-alphanumeric characters, escaping won't matter. – MatsLindh Dec 29 '17 at 12:17

0 Answers0