November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Have you seen this? https://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/11/DotNET-Client-API/Searching/Searching-over-multiple-types/
I usually do a MultiSearch though (https://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/11/DotNET-Client-API/Searching/Multiple-searches-in-one-request/) as mostly I want to split the results to separate tabs or something
Hi Jeroen,
Thanks for the link!
Did you use something like this?
results = service.MultiSearch<ContentData>()
.Search<Article>(x => x.For(query))
.Search<Category>(x => x.For(query))
.GetResult();
I actually used this: https://github.com/BVNetwork/DynamicMultiSearch
But I guess you could do it like you do, or maybe use
service.MultiSearch<IContent>()
Perhaps https://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/9/DotNET-Client-API/Searching/Unified-search/ is the right choice for you?
Hi,
I would like to search both cms pages e.g. standpages and commerce products, categories in one request
I tried to use the following solution but it seems not working correctly and I have problem with the value of totalmatching.
...
multiSearch = searchClient.Search<ContentData>().For(query).FilterForVisitor(currentLanguage).Skip(skip).Take(itemsPerPage).Track().GetContentResult();
foreach (var item in multiSearch)
{
if (item is Article)
{var article = ((Article)item);
....}
else if (item is Category)
{
var category = ((Category)item);
...}
else if (item is SitePageData)
{ var pageData = ((SitePageData)item);
...}
Any suggestions guys?
Thanks,
ChiChing