Search code examples
kentico

Kentico Custom Form control type: I want to give an user input with special characters to search for it


I have tried text box as form control type and it didn't work for "xxx & xxxx". So looking for suggestions if it is with Form control type or something else.If yes, please do let me know to fix it.


Solution

  • Smart Search (i.e.Lucene) supports escaping special characters that are part of the query syntax. The special characters are: + - && || ! ( ) { } [ ] ^ " ~ * ? : \ /. To escape these characters use the \ before the character. So try "xxx \& xxxx" and see if it works.