Scripted field - Fielddata is disabled on text fields by default ... Alternatively use a keyword field instead. How to solve?

Hello.
Running that script:

def inst = /.*instrument:([a-z]+).*/.matcher(doc['FullDetails'].value);
if (inst.matches()) {
return inst.group(1)
} else {
return "no match"
}

causes "Fielddata is disabled on text fields by default ... Alternatively use a keyword field instead."

How to solve that not doing fielddate:true?

Thanks.

I think our docs cover what to do in this:
https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html#before-enabling-fielddata

I found that, but I still cannot understand what should I do. Do I need to rebuild log?

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