Search Multiple Fields Same Parameter I'm building a search form with filters. This is one of the filters.
I would like to use the parameter "agent" and have it search a text field called "listingAgent" and "coListingAgent" to check for a match either place.  I tried the code below, but can't seem to get it to work.

    {% set getAgent = craft.request.getParam('agent') %}
    {% if getAgent %}
        {% set params = params|merge({ 'listingAgent':getAgent, 'coListingAgent':getAgent }) %}
    {% endif %}


additional info:
I noticed that setting the params twice (like below) is looking for a match in both fields. I am looking for a match in either field. Does anyone know how to go about doing this?

{% set getAgent = craft.request.getParam('agent') %}
    {% if getAgent %}
        {% set params = params|merge({'listingAgent':getAgent}) %}
        {% set params = params|merge({'coListingAgent':getAgent}) %}
    {% endif %}

{% set entries = craft.entries(params).search() %}
You have two different options. You can either use Crafts search so your string would be listingAgent:*searchterm* OR coListingAgent:*searchterm* or listingAgent:searchterm OR coListingAgent:searchterm if it should be an exact search

{% set results = craft.entries()
    .search({
        query: 'listingAgent:*' ~ getAgent ~ '* OR  coListingAgent:*' ~ getAgent  ~ '*',
        subLeft: true,
        subRight: true
    })
    .all() 
%}


or you query correctly for the field values but I would prefer to do that in PHP instead of Twig