SaaS CMS has officially launched! Learn more now.

EPi7.5 Indexing documents - Unified Search

Vote:
 

How do I fetch what startpage (in a multisite) a document belongs to?.

I want to index all mediadata with its belonging startpage id so that I can filter this site per site.

#80763
Jan 31, 2014 12:28
Vote:
 

AFAIK type in index already has partent chain path with ids - but for denormalization you can try to include StartPgeId field or so in indexable fields.

 

SearchClient.Instance.Conventions.ForInstancesOf<PageData>().IncludeField(x => x.StartPageId());
..

public static string StartPageId(this PageData content)
{
    // travel by ParentLink to find top most parent (StartPage) or fetch StartPage from repository directly
}

    

Then you can use this field to query for content for specific site.

#80792
Feb 02, 2014 21:10
* 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.