I want to do a search query so the product title or product tag name matches the keyword. below is my code. if I remove the tag related query, this code works as it looks into the product title only and returns the result. But how to make it work so it looks for the keyword in both product title and tag name? and if it exists in any one, it results specific records?
{% set productValues = {
keywords: craft.app.request.getParam('keywords'),
orderBy: craft.app.request.getParam('order') ? craft.app.request.getParam('order') : 'score'
} %}
{% set tag = craft.tags.search(craft.app.request.getParam('keywords')).first() %}
{% set productParameters = {
search: 'title:' ~ productValues.keywords,
relatedTo: [
'OR',
tag
],
orderBy: productValues.order
}%}