I'm using Magento v2.3 and using API to search products.

Following is the search criteria code.

'searchCriteria[filterGroups][0][filters][0][field]': 'name',
'searchCriteria[filterGroups][0][filters][0][value]': '%test%',
'searchCriteria[filterGroups][0][filters][0][conditionType]': 'like',
'searchCriteria[filterGroups][0][filters][1][field]': 'meta_keyword',
'searchCriteria[filterGroups][0][filters][1][value]': '%test%',
'searchCriteria[filterGroups][0][filters][1][conditionType]': 'like',
'searchCriteria[filterGroups][2][filters][0][field]': 'status',
'searchCriteria[filterGroups][2][filters][0][value]': '1',
'searchCriteria[filterGroups][2][filters][0][conditionType]': 'eq',

I want something like this (OR condition between two different columns).

WHERE name like '%test%' OR meta_keyword like '%test%'

But above code doesn't give me desired results.

I have gone through documentation of Magento here https://devdocs.magento.com/guides/v2.3/rest/performing-searches.html

but the examples shown in above link are "OR conditions on same column".

Thanks in advance!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.