File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -124,12 +124,11 @@ be used to request search results via AJAX and display the result by adding it t
124124
125125## Removing special chars from search term
126126
127- You might need to remove special chars to prevent search errors. Some chars are reserved in Elasticsearch
128- and you can replace them before submitting the search like this:
127+ It is recommended to remove characters, which are reserved in Elasticsearch from the search term to prevent errors. There is
128+ an eel helper to replace them before submitting the search like this:
129129
130130 prototype(Flowpack.SearchPlugin:Search) {
131- searchTerm = ${request.arguments.search}
132- searchTerm.@process.removeSpecialChars = ${String.pregReplace(value, "/[^a-zA-Z0-9äöüÄÖÜß]/", "")}
131+ searchTerm = Flowpack.SearchPlugin.SearchTerm.sanitize(${request.arguments.search})
133132 }
134133
135134Keep in mind, that this blocks the explicit use of wildcards (` * ` ) and phrase search (` "search exactly this" ` )
You can’t perform that action at this time.
0 commit comments