volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

UnifiedSearch with searchroot? Is it possible?

I want to have two search pages. One which search the entire site and one that just searches in just a specific page node. I want to return both pages and related media. How would I go about doing this?

#91483
Oct 07, 2014 14:49

Try adding a Filter with the Ancestors method. Example: .Filter(x => x.Ancestors().Match(myContentLink))

Hope this helps.

Frederik

#91493
Oct 07, 2014 16:01
Vote:

Ancestors will work, but "x" in this case will be ISearchContent, so you'll need to cast to IContent:

.Filter(x => ((IContent)x).Ancestors().Match("9"))
#91509
Oct 07, 2014 22:59
error This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.