ES5 - Search in wildcard field name

Hi all,

I have multiple fields with different analyzers:
text_english, text_spanish, text_french, etc..

I'm executing the follow query string:

{
  "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:

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 ?

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?

                    "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

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

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.

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