I have a sxa search component, In the sxacontent_txm field in Solr have indexing value( ex: Test search - result). In the searchbox I tried input "Test search - result" it response 0 results. enter image description here

But I tried removed '-' and using "Test search result" it response have results.

I'm using Sitecore 9.2 - SXA 1.9

Is there any way I can fix this issue?

Please helps me!

Thank so much.

1 Answer 1


SXA has a custom pipeline called normalizeSearchPhrase which is removing all special characters from the search phrase. All the characters from this HashSet are removed:

new HashSet<string> { "-", "+", "&", "|", "!", "{", "}", "[", "]", "^", "(", ")", "~", ":", ";", "/", @"\", "?", @"""" }

So it actually doesn't matter if you will search with - or without, you should see results. Please check Solr settings and see how tokenization is configured as what you have in my opinion is related to the Solr configuration.

Unless you are using an older version of SXA. If yes, then please contact Sitecore Support as we had such issues in the past.

  • Thanks for your response @Dawid Rutkowski, After I has decompiled Dll: Sitecore.XA.Foundation.Search with JetBrains, I see the Escape Character Set: "+", "&", "|", "!", "{", "}", "[", "]", "^", "(", ")", "~", ":", ";", "/", "\\", "?", "\"". It's not include "-" I will try create custom pipeline remove special search characters. Thanks Again! Aug 3, 2021 at 8:41
  • 1
    Hi @Dawid Rutkowski, After I created custom a pipeline, it fixed this issue of SXA search result. Thank you so much! Aug 4, 2021 at 3:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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