+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to search tags and other custom classification fields post 7.3

How to search tags and other custom classification fields post 7.3

1 posts, 0 answered
  1. Joe
    Joe avatar
    21 posts
    Registered:
    01 Dec 2010
    19 Mar 2015
    Link to this post

    I having issues implementing a text search for Tags and other flat classification fields that are part of a dynamic content item post 7.3.  Right now I'm using a list of strings and then building the query.  Title and Description are text fields and those work, however I'm not sure how to search the title of the classifications.  In this example, 'Tags' is the built in classification and 'holidays' is a custom flat taxonomy.

     

    Note I have added these fields as searchable in this particular index.

    List<String> searchFields = new List<string> { "Title", "Description", "Tags", "holidays"};
    var searchService = Telerik.Sitefinity.Services.ServiceBus.ResolveService<ISearchService>();
     var queryBuilder = ObjectFactory.Resolve<IQueryBuilder>();
     var searchQuery = queryBuilder.BuildQuery(searchTerm, searchFields.AsEnumerable());
     searchQuery.IndexName = "content";
    IResultSet contentResults = searchService.Search(searchQuery);

1 posts, 0 answered