How to search tags and other custom classification fields post 7.3
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);