I have a SXA search scope which is working, but as soon as I try to extend it with our "Company" field, it fails to find any results. Company is a multilist field.
Our steps:
- Create a search scope as:
template:{237FD461-A7F6-4080-AFAB-57227F87782E};...;+location:{FF3E546F-C781-4B47-84D7-23CE125CF473}
This works fine and is giving us the correct query and results. - We have to add an extra part to the query, for our company field. I added "
Company|....
". This does not seem to work. - I have tried to use the exact index field instead of the field name:
template:{237FD461-A7F6-4080-AFAB-57227F87782E};...;+location:{FF3E546F-C781-4B47-84D7-23CE125CF473};+custom:company_sm|01f831ffc56e4cf5ba719a1e77406ec9
Still no luck.
When I try with a another multilist field on those templates, it does work. When I checked my logs for the queries Sitecore is doing I saw something strange..
The query performed was: &search=(language_1:(en) AND (template_1:(237fd461a7f64080afab57227f87782e) OR template_1:(9d791aff92314b41b482f46737a59e0c) OR template_1:(bcbc94ab9b6a40079370b5052c44b20b)) AND company_s:(01f831ffc56e4cf5ba719a1e77406ec9))&$filter=(latestversion_1 and (path_1/any(t:t eq 'ff3e546fc7814b4784d723ce125cf473')) and searchable and (path_1/any(t:t eq 'ff3e546fc7814b4784d723ce125cf473')))&queryType=full&$skip=0&$top=12&$orderby=title&$count=true
Note that Sitecore is using company_s
instead of company_sm
- where for a multilist field the _sm should be used.
Why is this and how can I get Sitecore to use the exact field?