# ES5 - Search in wildcard field name

**URL:** https://discuss.elastic.co/t/es5-search-in-wildcard-field-name/83659
**Category:** Elasticsearch
**Created:** [April 26, 2017, 7:01am UTC](https://discuss.elastic.co/t/es5-search-in-wildcard-field-name/83659 "2017-04-26T07:01:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![idanhagai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/idanhagai/32/16175_2.png) [@idanhagai](https://discuss.elastic.co/u/idanhagai)
#### Post date: [April 26, 2017, 7:01am UTC](https://discuss.elastic.co/t/es5-search-in-wildcard-field-name/83659/1 "2017-04-26T07:01:46Z")

</div>

Hi all,

I have multiple fields with different analyzers:  
**text\_english** , **text\_spanish** , **text\_french** , etc..

I'm executing the follow query string:

```auto
{
  "query": {
    "query_string": {
      "fields": [
        "text_*"
      ],
      "query": "bla bla bla"
    }
  }
}

```

I have another field (NO INDEX) with the same name pattern **text\_full** that cause the following error:

```auto
java.lang.IllegalArgumentException: Cannot search on field [text_full] since it is not indexed.

```

Is there any way to exclude that field in query / to suppress this exception ?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 26, 2017, 7:28am UTC](https://discuss.elastic.co/t/es5-search-in-wildcard-field-name/83659/2 "2017-04-26T07:28:25Z")

</div>

Would may be better to use `copy_to` feature and copy whatever you want to index in something like `full.text` so it won't conflict.

What is this `text_full` field BTW? What is the mapping?

---

<div class="post-metadata">

### Author: ![idanhagai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/idanhagai/32/16175_2.png) [@idanhagai](https://discuss.elastic.co/u/idanhagai)
#### Post date: [April 26, 2017, 8:13am UTC](https://discuss.elastic.co/t/es5-search-in-wildcard-field-name/83659/3 "2017-04-26T08:13:48Z")

</div>

```
                    "text_spanish":{
                        "type":"text",
                        "analyzer": "MY_SPANISH_ANALYZER",
                        "term_vector":"with_positions_offsets"
                    },
                    "text_full":{
                        "type":"keyword",
                        "index":"false"
                    }

```

text\_spanish is a analyzed snippet from the text

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [April 26, 2017, 8:45am UTC](https://discuss.elastic.co/t/es5-search-in-wildcard-field-name/83659/4 "2017-04-26T08:45:17Z")

</div>

Why you don't index text\_full? I'm trying to understand your use case.

---

<div class="post-metadata">

### Author: ![idanhagai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/idanhagai/32/16175_2.png) [@idanhagai](https://discuss.elastic.co/u/idanhagai)
#### Post date: [April 26, 2017, 8:47am UTC](https://discuss.elastic.co/t/es5-search-in-wildcard-field-name/83659/5 "2017-04-26T08:47:56Z")

</div>

I need to analyzed only the snippet and also search only in the analyzed snippet.  
Search in the text\_full can retrieve irrelevant results for me.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 24, 2017, 8:50am UTC](https://discuss.elastic.co/t/es5-search-in-wildcard-field-name/83659/6 "2017-05-24T08:50:22Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
