Fixed minor search related bug

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ---
| Fixed tickets | ---
| Refs tickets  | 969fd5934b63f2d98b84ebd19ea218f99e7c521e
| License       | MIT
| Doc PR        | ---