Closed fabiana001 closed 7 years ago
Solution: Run the following code to enable fielddata on flat attributes:
PUT _mapping/articles
{
"properties": {
"crimes": {
"type": "text",
"fielddata": true
}
}
}
For categories.lower:
PUT _mapping/articles
{
"properties": {
"categories": {
"type": "text",
"fields": {
"lower": {
"type": "text",
"fielddata": true,
"analyzer": "not_analyzed_lower"
}
}
}
}
}
Example query:
Running the above query it returns an illegal_arguments_exception, with the following message : Fielddata is disabled on text fields by default. Set fielddata=true on [crimes] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.