Search in checkbox field with pagination It seems like this should be a simple thing, but it's evading me... I have a checkbox field in my entry named "articles_categories". Just to clarify, these are not actual categories -- they are checkboxes and I cannot modify them at this point.

I want to use the option value of the checkbox as an exact search parameter. I'm using pagination, so it needs to pass through paginate. This is what I have:

{% set topic = craft.request.getQuery('topic') %}

{% paginate craft.entries.section('blogArticles').limit(10).search(topic) as pageInfo, pageEntries %}


The option values are being passed as the topic parameter. For example, '?topic=healthcare',  or '?topic=food-fitness'. I'm getting a different set of results from each query, however, I don't believe that this is set up to return an exact match on the value passed through the search function.

I need only the articles that have an exact match in that field.
The value is stored as a serialized array in your database,  you would need to filter for the string "["healthcare","food-fitness"]"

Since your query parameter is an array you just need to prepend an and parameter to it so it looks like 

articles_categories(['and',  '*healthcare*', '*food-fitness*'])


If you have only one parameter and want an exact match you need to search for the exact string

craft.entries.articles_categories('["healthcare"]')