When using the Tokenizer processor, searching for special characters might currently be broken. The reason is that while you can configure Tokenizer to accept specific special characters as part of tokens (for instance, “@”), which will cause the DB backend to correctly index those tokens, the DB backend will then at search time still always split search keywords according to what it sees as white-space. Therefore, those tokens including special characters would never be found, as they are indexed in a form that will never be matched by a query.
This was already fixed for D8 in #2873023: Special characters are always ignored in searches on DB backend, but patch now needs to be ported to D7. The solution there was a bit heuristic, merely checking for the presence of the “Tokenizer” processor and modifying search-time behavior (that is, whether special characters are accepted as part of search keywords) accordingly. However, this should cover almost all real-world use cases, so is very likely good enough. (Also, it could always be amended later.)
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3191489-2--searching_special_chars.patch | 7.11 KB | drunken monkey |
Comments
Comment #3
drunken monkeyThis patch would implement the same solution as in #2873023: Special characters are always ignored in searches on DB backend.
Comment #4
drunken monkeyComment #5
drunken monkeyComment #8
drunken monkeyGot positive feedback by mail, so: committed.