[FEATURE REQ] [Azure Cognitive Search] Add method to escape Lucene queries #8719
Labels
Client
This issue points to a problem in the data-plane of the library.
feature-request
This issue requires a new behavior in the product in order be resolved.
Search
Milestone
(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.
The text was updated successfully, but these errors were encountered: