# Search in all attributes except one

**URL:** <https://discuss.elastic.co/t/search-in-all-attributes-except-one/381518>\
**Category:** Elasticsearch\
**Created:** [September 2, 2025, 12:25pm UTC](https://discuss.elastic.co/t/search-in-all-attributes-except-one/381518 "2025-09-02T12:25:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatthiasKuehne](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@MatthiasKuehne](https://discuss.elastic.co/u/MatthiasKuehne)\
**Post date:** [September 2, 2025, 12:25pm UTC](https://discuss.elastic.co/t/search-in-all-attributes-except-one/381518/1 "2025-09-02T12:25:45Z")

</div>

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

```json
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!
