When I’m on site/0 and searching I get hits all over the place.
I want to restrict my global search to selected content archives, and only a few content types and/or languages.
How do I do that?
I also get "cmsga.sio.no/[undefined]: Not able to create link to site 1: No valid cms.site.url defined in site-1.properties.
My example is not tested, I’m just writting it from the top of my mind. Use getContentByCategory to filter which content archive folders to look inside. Then add your param.q to the query-part, and add on the filtering for language with concat.
buildFreetextQuery with “AND” is a very strict search, try using “OR” instead.
The query for “language” you should double check in your content source that this is what the language setting is really stored as and change if needed.