1

Have a requirement to provide a filter on news articles for Author.

Created a dropdown filter based on a facet (which is based on a BlogAuthor template field which is of type single line text).

Now filter populates with author names separated out by spaces in them.

How can I populate filter with 'Author 1', 'Author 2' etc. I am using SOLR for search indexes.

Template design

Facet definition

Dropdown filter

Blog article data

Rendering on the page

0

I am able to resolve the issue by updating SXA SOLR index by adding following. It seems single-line-text fields get stored as text_general so making it stored as a string brings back value as a whole and not separated by spaces.

<fieldTypes hint="raw:AddFieldByFieldName">
  <field fieldName="blogauthor" returnType="string" />
</fieldTypes>

Thanks to Maarten from Sitecore slack community channel for suggestion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.