Skip to content

Instantly share code, notes, and snippets.

@contensis
Created May 20, 2014 14:30
Show Gist options
  • Save contensis/5022a84ce317bdad0cd1 to your computer and use it in GitHub Desktop.
Save contensis/5022a84ce317bdad0cd1 to your computer and use it in GitHub Desktop.
How to use Web API Search query methods.
@using Contensis.Framework.Web
@using Contensis.Framework.Web.Search
@{
var query = Query.Where("Property_Path").StartsWith("/Products/Books/").Or("Property_Path").StartsWith("/Products/Toys/");
var nodes = new NodeFinder().Find(query);
}
<h1>Search Results</h1>
<ul>
@foreach(var node in nodes){
<li>@node.Title</li>
}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment