Is it possible to get a products field template id as a read tag when searching products?
In the Search method of ProductSearchService you can add Readtags to the Searchrequest like this.
request.ReadTags.Add(TagNames.ArticleNumber);
I notice there’s a TagName.TemplateId but that doesn’t add any tag to the search response hits tags when searching for products. Is this a bug or isn’t the TagName.TemplateId applicable on products?
Hi,
Only the field template name is indexed as read tag. You can get the tag name via
var fieldTemplateName = TagNames.AppendLanguage(TagNames.TemplateName, language);
If you want to get the FieldTemplateSystemId or FieldTemplateId you have to index that one in your solution via hooking in the indexing process by implementing IIndexingProviderPreProcessor.
SeeCampaignIndexingProviderPreProcessor in the accelerator as an example of IIndexingProviderPreProcessor.