Copied to clipboard

Flag this post as spam?

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


  • Remko 118 posts 283 karma points
    Mar 12, 2019 @ 16:06
    Remko
    0

    v8 - How does umbracoHelper.Search work in v8 (with IQueryExecutor?) ?

    The old way:

    var query = ExamineManager.Instance.CreateSearchCriteria();
    query.Field("testProperty", "IsEqualToThisValue");
    
    var results = umbracoHelper.Search(query).ToList();
    

    Now there is:

     umbracoHelper.ContentQuery.Search(IQueryExecutor ??)
    

    How should I create the query object, is it IQuery I should use? And how can I get the instance for this in the first place?

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Mar 13, 2019 @ 09:20
    Sebastiaan Janssen
    0

    Haven't tried it but this seems like you'd want to use this method instead: IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = null, string indexName = null);

  • Remko 118 posts 283 karma points
    Mar 13, 2019 @ 09:22
    Remko
    0

    Hi Sebastiaan,

    No I know that one.. But I'd like to use IQuery instead of query in a string...

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Mar 13, 2019 @ 09:29
    Sebastiaan Janssen
    0

    IQueryExectutor is not doing anything else magic, it uses the paged method above directly:

    enter image description here

  • Jonathan Roberts 409 posts 1063 karma points
    Dec 06, 2019 @ 13:35
    Jonathan Roberts
    0

    Can you use to get ALL pages in the site by Document Type? I dont want to use a search term - just pull all pages of a particular type

  • 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