Copied to clipboard

Flag this post as spam?

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


  • Anton 135 posts 186 karma points
    May 10, 2012 @ 14:23
    Anton
    0

    How get all nodeTypeAlias by Examine?

    var criteria = ExamineManager.Instance.SearchProviderCollection[searchClass.GetInternalSearcher()] .CreateSearchCriteria(IndexTypes.Content);

    var manager = ExamineManager.Instance; var searcher = manager.SearchProviderCollection[searchClass.GetInternalSearcher()];

    string[] words = new string{"car","petrol"};

    string[] fields = new string{"nodeTypeAlias","petrol"};

    Examine.SearchCriteria.IBooleanOperation filter = null;

    foreach (var word in words) { if (filter == null) { filter = criteria.GroupedOr(fields, word); } else { filter = filter.And().GroupedOr(fields, word); } }

    var results = searcher.Search(filter.Compile());

    I want to get all nodeTypeAlias or get "car" and "bus". How I can do it?

     

Please Sign in or register to post replies

Write your reply to:

Draft