ps-team
10/27/2017 - 8:11 AM

Example of doing a weighted search with the WebApi

Example of doing a weighted search with the WebApi

@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>