Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm using the quickstart to get search up and running: https://our.umbraco.com/documentation/Reference/Searching/Examine/quick-start/
var results = searcher.CreateQuery("content").NodeTypeAlias("textPage").And().GroupedOr(textFields, searchTerm).Execute();
But when i try to restrict to a specific nodetypealias using the example code i get get an errormessage saying
IQuery' does not contain a definition for 'NodeTypeAlias' and no accessible extension method 'NodeTypeAlias' accepting
Hi Henrik,
You need to add
@using Umbraco.Examine;
At the top of your partial view (third line is good). Then it will work.
I'll see about adding this to the documentation as that's not obvious!
HTH
Steve
Cheers
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Examine Quick Start - Error in documentation?
I'm using the quickstart to get search up and running: https://our.umbraco.com/documentation/Reference/Searching/Examine/quick-start/
But when i try to restrict to a specific nodetypealias using the example code i get get an errormessage saying
Hi Henrik,
You need to add
At the top of your partial view (third line is good). Then it will work.
I'll see about adding this to the documentation as that's not obvious!
HTH
Steve
Cheers
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.