I am trying to improve the performance of our site search. I'm wondering if there is anything I can implement that may speed things up. Currently we have a search being sent to a results page. In the results page we have this call to the database.
{% set entries = craft.entries.search(query).order('score') %}
query is returned from the q parameter in the url.
We are using a matrix field for all the main content blocks on the site. This field has 10 block types with a max of 7 fields in each. This is used on all entries across the site.
Looking at the profiler after running a query on a phrase that is very popular across the site it takes around 11s and queries the db 500+ times.
Any suggestions how we may reduce this time down? Or is this just a disadvantage of using matrix fields?