azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[FEATURE REQ] [Azure Cognitive Search] Add method to escape Lucene queries
(This issue was created to track this User Voice feedback).
Special characters must be escaped to be used as part of the search text. You can escape them by prefixing them with backslash (\
). Special characters that need to be escaped include the following:
+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ /
Currently there is no built-in method in the SDK, basically the equivalent of UrlEscape
, which can do this, so every developer has to create their own implementation.
Note that this is a separate concern from the URL-encoding of search text when sent in the URL query string, or JSON encoding of the search text when sent in the request body. The SDK already handles both of those cases.
This issue has been idle for two years. Is this still a planned feature?