Contentful logo

Contentful Community

Full text search by multiple fields

Hello!

I’m facing a problem with full-text search. Is it possible to create one request with match on multiple fields?
For example, i have content model Product with fields Name, Description, Code and i want to find all products whose fields are matching search text ( Name[match]: <search_value> or Description[match]: <search_value> or Code[match]: <search_value> )

Or i need to create 3 different requests?

Hi @efedorov.unit,

You would indeed need to create 3 different requests - we don’t have an operator in analogy to what you would expect of OR operator in relational databases. Instead, you’d request these with separate queries and later concatenate their responses.

Hi @gabriel, thanks for your response!

Glad to help! Let me know if you have any other questions.