Hello lovely people,
is there some way for a query_string - Query to search in ALL attributes EXCEPT one? Or can I use another type of query to search for documents matching a search term in all attributes except one?
Ive got this query
GET _all/_search
{
"query": {
"query_string": {
"query": "*searchterm*"
}
}
}
The ES documents all have different attributes. If there is any match in any attribute (except one very specific attribute) than the ES document should be returned.
The problem is: I dont know which attributes are present for each ES document. I could be just one (“file.filename”) or it could be multiple (parsed content or metadata from PDFs, images, etc…). So I cant use the “fields” key for “query_string”.
Thanks in advance!