The “Search” section of settings dashboard includes the complete list of options through which you can set up search ajax parameters on the site.
Search can be extended to the following components:
- all site contents or only products
- titles
- excerpts
- posts and pages content
- product categories
- product tag
- author
- custom field
- product identifier (SKU)
The “Multiple Word Search” option allows showing those site components that include all or one of the keywords inserted by users.
With the “Hide out of stock products” enabled, you will only search for products that are in stock.
Cache result in transient
To speed the search of the contents on your site, you can use some transients and enable the “Enable transients to cache autocomplete results” entry.
The result of each search query is stored in a transient for the same duration you set.
This way, if a search is applied before the transient expiration, the system will fastly recover the result previously obtained.