# Multi\_site + search extensions, any suggestions for limiting results

**URL:** <https://www.ruby-forum.com/t/multi-site-search-extensions-any-suggestions-for-limiting-results/127542>\
**Category:** Radiant CMS\
**Created:** [January 30, 2008, 6:22am UTC](https://www.ruby-forum.com/t/multi-site-search-extensions-any-suggestions-for-limiting-results/127542 "2008-01-30T06:22:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_muhl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2acd7d/32.png) [@john\_muhl](https://www.ruby-forum.com/u/john_muhl)\
**Post date:** [January 30, 2008, 6:22am UTC](https://www.ruby-forum.com/t/multi-site-search-extensions-any-suggestions-for-limiting-results/127542/1 "2008-01-30T06:22:54Z")

</div>

I had three 0.6.4 gem installs that merged into one this afternoon  
(put two on top of one). Thanks for the work that obviously into this  
and the shards extensions; I’m by no means a guru in these matters and  
the setup took less than an hour.

I’m just looking for a little help trying to limit the search  
extension to the current domain. As it stands a search from domain X  
returns pages from the other two domains. I looked in the available  
tags and didn’t see any way to use the radius tags to accomplish this.  
Are there any new radius tags added with the multi\_site extension that  
just don’t show up in the available tags interface that might be  
useful? Or some clever way to use the existing tags that I’ve just  
overlooked?

thanks  
john

---

<div class="post-metadata">

**Author:** ![john\_muhl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2acd7d/32.png) [@john\_muhl](https://www.ruby-forum.com/u/john_muhl)\
**Post date:** [January 30, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/multi-site-search-extensions-any-suggestions-for-limiting-results/127542/2 "2008-01-30T15:46:03Z")

</div>

No, you’ll probably have to change the search extension to accommodate  
this, or write some tags of your own in a separate extension. Although  
the core of the multi\_site functionality is in the extension, we also  
used it to restrict controllers to specific domains and invoked the Site  
model in other areas of the code. It is also not always a trivial  
matter to add a tag around some other tag to achieve the effect you  
want.

Anyway, I will look into what would be required to make them compatible.

Sean

---

<div class="post-metadata">

**Author:** ![john\_muhl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2acd7d/32.png) [@john\_muhl](https://www.ruby-forum.com/u/john_muhl)\
**Post date:** [February 7, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/multi-site-search-extensions-any-suggestions-for-limiting-results/127542/3 "2008-02-07T18:55:35Z")

</div>

On 2008/01/30, at 07:45, Sean C. wrote:

> No, you’ll probably have to change the search extension to accommodate  
> this, or write some tags of your own in a separate extension.  
> Although  
> the core of the multi\_site functionality is in the extension, we also  
> used it to restrict controllers to specific domains and invoked the  
> Site  
> model in other areas of the code.

I had a look at both extensions and took an hour to see if I could  
bend them  
into shape. After failing for an hour I decided it was non-trivial  
enough to  
set aside for now. I will give it another try again once edge isn’t  
required  
to run multi\_site, with the Rails 2 branch getting into trunk and all  
the  
changes I imagine are coming it seems like the wrong time for me to  
try this.

Fortunately, I only had one site making use of search and the other  
sites  
aren’t too heavy on pages so for now I just added a “no-search” page  
part.  
Obviously not ideal but gets close enough particularly considering it’s  
overall negligible impact.

> It is also not always a trivial matter to add a tag around some  
> other tag  
> to achieve the effect you want.

The most trivial approach at this point seems like just switching to an  
external search service.

> Anyway, I will look into what would be required to make them  
> compatible.
> 
> Sean

Thanks again for your work.

john
