Multi-website Single Solution. Site Specific Search without visible prefix?
I'm working on a multi site umbraco install that requires site search for each. New sites will be added to the solution as needed but I estimate we could end up with over 20 small sites and one larger international site in the same content panel.
We're looking to added site search to each. With traditional search controls the simple but ugly process would be crawling each site into the same index then applying using a site prefix in the query.
An example of this would be on www.sitea.com to search without including results to pages on other sites the query would need to be "keyworda keywordb site:www.sitea.com"
Are there any existing controls available to achieve site specific search without any sort of site: prefix being visible to the user? Maybe even a control that creates multiple indexes?
You can use XSLTsearch (http://our.umbraco.org/projects/website-utilities/xsltsearch) and simply specify the source="" macro parameter to be the homepage for each of your sites. It will then only search within that site.
Depending on your search engine needs, you could have a look at XSLTSearch. XSLTSearch allows you to specify from which node to search downwards or what the highest level is at which the search should start (using ancestor-or-self, then you can tell it not to go higher than level 1 to prevent you from encountering other sites).
@Doug Beat me to it! I made it generic in a site, so it doesn't look higher than level 1 from the current node upwards. That way I don't need to specify the source for each site, very very handy when you have 30 of them in 1 install! :-)
Multi-website Single Solution. Site Specific Search without visible prefix?
I'm working on a multi site umbraco install that requires site search for each. New sites will be added to the solution as needed but I estimate we could end up with over 20 small sites and one larger international site in the same content panel.
We're looking to added site search to each. With traditional search controls the simple but ugly process would be crawling each site into the same index then applying using a site prefix in the query.
An example of this would be on www.sitea.com to search without including results to pages on other sites the query would need to be "keyworda keywordb site:www.sitea.com"
Are there any existing controls available to achieve site specific search without any sort of site: prefix being visible to the user? Maybe even a control that creates multiple indexes?
Cheers
You can use XSLTsearch (http://our.umbraco.org/projects/website-utilities/xsltsearch) and simply specify the source="" macro parameter to be the homepage for each of your sites. It will then only search within that site.
cheers,
doug.
Depending on your search engine needs, you could have a look at XSLTSearch. XSLTSearch allows you to specify from which node to search downwards or what the highest level is at which the search should start (using ancestor-or-self, then you can tell it not to go higher than level 1 to prevent you from encountering other sites).
@Doug Beat me to it! I made it generic in a site, so it doesn't look higher than level 1 from the current node upwards. That way I don't need to specify the source for each site, very very handy when you have 30 of them in 1 install! :-)
Here's a blog post that explains Sebastiaan's excellent idea. http://blog.percipientstudios.com/2010/11/11/user-modification-to-xsltsearch-for-easier-multi-site-searching.aspx
cheers,
doug.
If I had more karma I'd like all of this. Very nice. Wish I'd had this a couple of yeas ago.
@Leon - Thanks. XSLTsearch has been around since Umbraco 2.1 but it does get better and better over time :)
You're nearly at 70 karma which is (I think) when you can 'High five!' items.
cheers,
doug.
is working on a reply...