Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • stefano 6 posts 26 karma points
    Jun 26, 2014 @ 11:33
    stefano
    0

    Error loading Partial View script...

    Hi,

    i'm trying to search, using examine, a term into a treenodepicker. I wrote this:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage

    @using Examine

    @using Examine.SearchCriteria

    @using UmbracoExamine

    @{

    var searchString = "3371";

    var criteria = ExamineManager.Instance.CreateSearchCriteria();

    var expression = criteria.Field("aree", searchString);

    var searchResults = ExamineManager.Instance.Search(expression.Compile());

     

    }

    <ul>

    @foreach (var c in searchResults)

    {

       <li><a href="@umbraco.library.NiceUrl(c.Id)">@c.Fields["nodeName"]</a></li>

    }

    </ul>

     

    field "aree" contains the values of the treenodpicker

    If i have only one value the partial view retrive result.

     

    If the field aree have more than one value, i can't retrieve documents

    So I tried to use fuzzy() 

    var expression = criteria.Field("aree", searchString.Fuzzy());

    but it gives me error!

    Error loading Partial View script (file: ~/Views/MacroPartials/xxxxxxx.cshtml)

     

    Regards

    Stefano

  • Dan Lister 416 posts 1974 karma points c-trib
    Jun 26, 2014 @ 12:21
    Dan Lister
    0

    Hi Stefano,

    Have you looked to see if there are any errors within your log files? If so, what are they?

    Dan.

Please Sign in or register to post replies

Write your reply to:

Draft