The new search components in the UI add the default behavior of using a regex search via text autocomplete. This has the enhancement of allowing users to perform a substring match on entered text, making most use cases for search easier.
For example, to find the policy "Secure Shell (ssh) Port Exposed in Image" a user could enter "ssh" instead of "Secure shell..." to get the correct results.
This change has created two new issues:
- Selecting an item from the autocomplete dropdown also applies a regex search, resulting in duplicate items. For example, selecting "central" from the dropdown will also return results for "central-db".
- Selecting an item that has regex special characters will cause the search to fail outright, as the characters are not interpreted literally.
The fix for this will be as follows:
- Selected items from the autocomplete dropdown will perform an exact match instead of a regex match.
- Text entered into the autocomplete box and applied via "Enter" key, or via the manual apply button will continue to use regex search.