I am experiencing slow response times on our site when performing a site wide general search. We are using OOB SimpleSearch class (com.day.cq.search .SimpleSearch) and an adapted OOB search component.
The searches being performed are for single characters A-Z and 1-300. The response time for a search when simulating 300 concurrent users searching is 20 seconds. The target is 5 seconds.
I have looked at ways to optimise the search but nothing is obvious to me. One thing that would speed up search is exluding a directory which contains news articles (/content/website-name/en/news) as this is not required to be included in the general site search results and contains over 1500 content pages, but I can't see how to exclude an entire directory. The only property that can be set is setSearchIn() which is set to /content/website-name/en.
Another approach might be to exclude single character searches but I haven't done any performance analysis between single character, word and phrase searches yet.