November Happy Hour will be moved to Thursday December 5th.

EpiServer FIND Indexing Sub Sites

Vote:
 

Hi,

I have a site that has "Micro Sites". This means that we have a large single site which has Child pages that create a sort of Sub Site. For example:

> MainHome
          > About Us
          > Contact Us
          > Search Results
          > MicroSite1Home
                          > About Us
                          > Contact Us
                          > Search Results
          > MicroSite2Home
                          > About Us
                          > Contact Us
                          > Search Results
           > FAQ

 

Is it possible to set up FIND Search pages on the Main Home page and a seperate FIND Search page on each Microsite so that the results only reflect per mainsite/microsite?

So basically, using the diagram above, when the user is browsing the MainHome (www.MainHome.com) site they can search just this section.

If a user is browsing the Microsite1Home (www.MainHome.com/MicroSite1Home) site they can search just this section of the site?

Plus, we use Templates and Composer elements so these need to be indexed.

Hope this makes sense,

 

Jon

 

#72744
Jun 27, 2013 12:28
Vote:
 

Hi

There are a couple of extension methods you could use for this. Example: Ancestors().

SearchClient.Instance.Search<IContent>().Filter(x => x.Ancestors().Match(ContentReference.StartPage.ToString());

Frederik   

#72806
Jun 30, 2013 19:38
Vote:
 

I would suggest Ancestors also.  Another option is to use the built in Categories within EPiServer and mark each page by the "sub-site" category for example: MainSite, Microsite1, Microsite2

Then its only a simple Filter on category 

#73515
Jul 25, 2013 12:52
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.