Craft 3 - Twig search query for entry with custom EntriesField containing disabled entry I have a search form with 1 simple input (q)
I also have 2 sections: SECTION-A &amp; SECTION-B
The search is for entries within SECTION A.
The entry I'm searching for contains a custom entriesField from SECTION B which can contain a posible disabled entry because they have an expiryDate. But they still need to be searchable when typing something the disabled entry contains. I can't figure out what to do with my query.
This is what i have so far: (works perfectly with an enabled related entry from SECTION B)
{% set entries = craft.entries.section('SECTION-A').search(searchParam).orderBy('score').all() %}

what I am trying:
{% set entries = craft.entries.section('SECTION-A').search(searchParam ~ ' status: any').orderBy('score').all() %}

But this is not working, can anybody help me out here? :)
Screenshot clarification:

When searching october (expired entry from SECTION-B), it is NOT showing me results.
When searching november (entry from SECTION-B), I get the results I am expecting

some technical information:

PHP version  7.3.22
Database driver &amp; version    MariaDB 10.3
Craft edition &amp; version  Craft Pro 3.5.14
The search parameter only searches the element that is the subject of your element query (i.e., the source entry) - it does not search related entries. For that you need to use the relatedTo parameter. (I'm not sure why you're getting a successful result for the November entry - perhaps the source entry also has the word November in it somewhere?).
Additionally, you'll need to use the anyStatus parameter to fetch expired entries.
So to pull this off, you'll need to conduct the search against the other section and then find related entries, i.e.:
{% set sectionBEntryIds = craft.entries.section('SECTION-B').search(searchParam).anyStatus().orderBy('score').ids() %}

{% set sectionAEntries = craft.entries.section('SECTION-A').relatedTo(sectionBEntryIds).all() %}