Filtering out section entries I'm quite new to Craft CMS and have takeen over an application (using Twig templates).  I'm trying to run a filter but not having much joy so maybe I might get some help!

So, there is a people section (craft.entries.section('people')) with over 1000 entries. These are displayed in an HTML table, each row has 3 columns (handled using the batch() call). I want to exclude certain entries that match a particular condition.

For example, I want to exclude all 'people' that partially match a list of names (e.g 'xyz', 'zzzz', 'joebloggs')

{% for people in craft.entries.section('people').order('title asc').limit(500)|batch(3) %}


Is it possible to do a query like this before the loop? Or is it something I need to check on each iteration inside the loop? Doing this might make the batch() unusable?
If you want to search for entries, you can use the search parameter:

{% set people = craft.entries
    .section('people')
    .search('*xyz* OR *zzzz*') 
%}


Then, you can loop through those people like this:

{% for person in people |batch(3) %}
    {{ person.name }}
{% endfor %}


By default, search doesn't do fuzzy search, that's where the *s come in. You can, however, enable fuzzy search by default.

If you want to limit your search to a field, do:

{% craft.entries.search('fieldHandle:xyz OR fieldHandle:zzzz') %}