SearchService result is always empty

When I searching order row comments (after rebuild search index), it always return 0 hits

var request = new QueryRequest(Solution.Instance.Languages.DefaultLanguageID, ECommerceSearchDomains.Orders, ModuleECommerce.Instance.AdminToken);

        request.FilterTags.Add(new Tag(TagNames.Comments, comment));
        request.Paging = new Paging(1, 1000);
        var response = Solution.Instance.SearchService.Search(request);
        return response.Hits.Count

Why it is always empty ?

The comment from the order row are not indexed, to include them in the index you need to create an pre-processor that will enrich the index document with more information. Check how that is done in the accelerator, example CampaignIndexingProviderPreProcessor.

HI Patric,
I added new pre-processor for order row comment. Now am getting correct result while using search service (through code). But in Back office, still no result. Is there any way to get result in BO ?

I think the BO search are searching in the field with name Litium.Foundation.Search.Constants.TagNames.Body, try to add the order row comment into this also.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.