Copied to clipboard

Flag this post as spam?

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


  • nelsenlim 70 posts 71 karma points
    Jul 08, 2011 @ 06:26
    nelsenlim
    0

    Umbraco Examine Fluent API

    BaseSearchProvider sp = ExamineManager.Instance.SearchProviderCollection["InternalSearcher"];
    ISearchCriteria sc = sp.CreateSearchCriteria(UmbracoExamine.IndexTypes.Content);
    var query = sc.Id(1080).Or().Id(1081);

    ISearchCriteria criteria = query.Compile();
    IEnumerable<SearchResult> results = sp.Search(criteria);

    Hi, i am having difficulties making the .Or() in Examine works, it just seems to ignore the Or()
    I created a simple query looking for a node with Id==1080 or Id==1081 but i onlu get a node of Id 1080 returned, is there anything wrong with the way i write the syntax?

    Best regards,
    Nelsen

  • 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.

Please Sign in or register to post replies