you can set the pathPrefix in your search input module in the HTML&HUBL-code window. This hidden input adds two different parameters to the search-query url. (In this Screenshot: Search only for Blogposts with the pathPrefix=de => german blogposts)
On this page you can see different implementations of the search:
Search on English Website (Topnavigation) => Search Results Page delivers Results of the english website.
Search on German Website => German Website Results
Search on English Blog (Sidebar or Topnavigation) => English Blogposts
Search on German Blog => German Blogposts
You also can use the query parameters in the URL to customize the behaviour of the search result page. (German/English Footer, Tabbed Search Module in the sidebar, German/English-“No Results-Message”,…)
Thank you for your great and clear explanation. However, I’m still a bit confused about how I may implement it in my particular case. I intend to make a search in a user manual, i.e. a section with a limited group of pages at our site. You can’t isolate these pages by neither page type, language or only first level in the path (Path Prefix). The ability to use several levels in the path would be terrific. Alternatively, if I could tag these pages with a searchable ID. Or do you have an even more clever solution?
I agree, it ought to work, but it doesn’t. At least not for me. As soon there is a / in the URL it will be transcoded to %2F (as it should) but there is where it stop working.
It will always result in “Sorry. There are no results for [query string] Try rewording your query, or browse through our site.”
I’m curious about what makes it work for you, but not for me.