0

I am facing the below issues and want to understand the behavior of SXA OOTB search box and search results

  • When searched with special characters, those gets replaced by blank space, if I search for "[email protected]", it replaces as "abc domain com" and provide the search results
  • When search for "word1 word2", it provides the search result for "Word1" and "word2" not "word1 word2".
  • Once Load more is clicked, if we search again, then clicking on "Load More" does not load more results, it starts working on page refresh again.

I am using OOTB search box, search result and load more.

I would like to understand the exact behavior of the OOTB components, link to a explained documentation will help. Also, if anyone has faced the issues/ fixed, let me know.

Sitecore.NET 9.1.0 (rev. 001564) SXA 1.9

2
  • google.com/search?q=sitecore+sxa+search first 9 links points to Sitecore documentation about search functionality in SXA
    – Marek Musielak
    Commented Nov 26, 2020 at 7:39
  • Thanks for the response @MarekMusielak. I have already checked the documentations, unable to find the answers to my questions.
    – D J
    Commented Nov 26, 2020 at 8:51

1 Answer 1

1

Yes, SXA will replace all special characters with space. Those characters are: -, +, &, |, !, {, }, [, ], ^, (, ), ~, :, ;, /, \, ?, "". It is done in RemoveSpecialSearchCharactersProcessor processor from normalizeSearchPhrase pipeline.

In terms of searching for word1 word2 you're also right, we will split the search phrase by space and add it as another statement in the search query. For more details take a look at ContentPredicate method from SearchService.

We have some plans to change it a bit and add more configurations so that users could choose different behaviours. But so far, this is how the SXA search works.

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