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.
AI OnAI Off
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.
Figured out this is inside the IndexResponseItems property on SearchResults
A bit of a follow-up here: Through the IndexResponseItem I am able to extract DisplayText and Title, When I then try to fetch a link to the result through the Uri property I only get strings on this format:
/link/001ec724ef5543f2946d9f1690f0b35a.aspx?id=4744&epslanguage=en
Earlier I used :
var urlResolver = ServiceLocator.Current.GetInstance<UrlResolver>();
urlResolver.GetVirtualPath(someContentReference here); <-- giving me a nice url like :/production/myitem/
However, I dont have a contentreference for the result. Any suggestions ?
Solved it like this:
string myUrl = urlResolver.GetVirtualPath(contentSearchHandler.GetContent<PageData>(item).ContentLink)
I am using the built-in search in EPiServer, and so far so good. However I need to display the part of the page that matches the query. For instance: A user searches for "water" and in one page the match is "it is water in the ocean" , I want to display:
1) title of the page
2) the text where the search matched.
Is this possible?