I want to change SXA search box algorithm to support exact matching, when I search with a work like "National Day", it returns results that contains "National" or "Day" or "National Day", I want it to returns results that contains "National Day" as a whole only.
This is not possible out of the box, although we've been discussing this today and there is a chance we will change it in future releases.
If you want to change it on your own you need to implement your own SearchService. It might sound scary but in fact, you just need to inherit from SXA
SearchService and override
ContentPredicate() method. Take a look at original implementation, you will notice that we are using there
Contains LINQ method which is comparing search query with AggregatedContent field. Probably you just need to replace
After this just replace SXA implementation of ISearchService with your one in the DI container.