I have an index for user registrations for fast search. I need to implement search by certain fields for each event. (each event has its registrations, but of course, I'm storing them into one index)
I'm trying to search it with these parameters:
'query' => [
'query_string' => [
'query' => $query,
'fields'=> ['name', 'lastName', 'email', ...]
],
],
]
But I also need to specify a term, that it should be searching within registrations for a certain event. I have a keyword field for that in my index: event_id.
How can I add this term (event_id) to the current search request?
PS: Filtered has been removed (replaced by bool, but it doesn't support query_string)
Or would it be better to specify a different index type: _type for each event?