Created
October 27, 2017 08:11
-
-
Save ps-team/670afb3f5ca48a5058ff1a94ebe94e3f to your computer and use it in GitHub Desktop.
Example of doing a weighted search with the WebApi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Contensis.Framework.Web | |
@using Contensis.Framework.Web.Search | |
@using System.Collections.ObjectModel | |
@{ | |
IQuery pageQuery = Query.WhereFullTextContains("Contensis", In.Column("Property_Title", 100), In.Column("SC_Content", 10)); | |
ReadOnlyCollection<ContentNode> pages = new NodeFinder().Find(pageQuery, selectCount:3); | |
} | |
<ul> | |
@foreach(ContentNode page in pages) { | |
<li>@page.Title</li> | |
} | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment