Copied to clipboard

Flag this post as spam?

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

  • Daniel Rogers 81 posts 397 karma points
    1 week ago
    Daniel Rogers

    Examine get exact doc type

    using Umbraco8

    I have 2 Doctypes that are similarly named.

    IBDeCommerceProduct IBDeCommerceProduct_Folder

    My issue is that when I run the following code I get both doctypes back not the one I want

                ISearcher examineSearcher = ExamineManager.Instance.TryGetIndex("ExternalIndex", out var index) ? index.GetSearcher() : null;
                //restrict the search to the Content section, create our search criteria object
                IQuery criteria = examineSearcher.CreateQuery("content");
    IBooleanOperation queryNodes = criteria.GroupedOr(new string[] { __NodeTypeAlias }, "IBD_eCommerce_Product");

    How do I ensure only the exact Doctype is returned?

Please Sign in or register to post replies

Write your reply to: