Describe the bug
Using search-bar's attemptPageTypeSearch property only works for single-word departments and still falls into a regular search page when searching for more than one word.
To Reproduce
Steps to reproduce the behavior:
- Set
search-bar's attemptPageTypeSearch property to true
- Search for a department with two or more words in it
- It enters a regular search page
Expected behavior
It should identify that there is a department with that name and access /my-department-example instead of /my%20department%20example.
Additional: If there is not a department that fits the term, it should fallback to regular search route /example?_q=example&map=ft
Screenshots

Department is not searchable through normal search-bar settings.

We then added attemptPageTypeSearch property as true.

It works perfectly for single-word departments as the one in the image.

It fails to recognize and convert "tapete infantil" to its department URL.
Desktop:
- OS: Windows
- Browser: Chrome
Additional context
This project has a department called "Enxoval" and another that is called "Tapete Infantil". We've used those as an example because they demonstrate when attemptPageTypeSearch is effective and where is its pitfalls.
Describe the bug
Using
search-bar'sattemptPageTypeSearchproperty only works for single-word departments and still falls into a regular search page when searching for more than one word.To Reproduce
Steps to reproduce the behavior:
search-bar'sattemptPageTypeSearchproperty totrueExpected behavior
It should identify that there is a department with that name and access
/my-department-exampleinstead of/my%20department%20example.Additional: If there is not a department that fits the term, it should fallback to regular search route
/example?_q=example&map=ftScreenshots

Desktop:
Additional context
This project has a department called "Enxoval" and another that is called "Tapete Infantil". We've used those as an example because they demonstrate when
attemptPageTypeSearchis effective and where is its pitfalls.