I have an index that I created simply by importing a bunch of docs, so elasticsearch created all the mappings by default. One of the fields is a potentially large text field that we need the whole thing to be keyword searchable. Here's the mapping for it.
"notes" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
From what I've read, the ignore_above would limit it to only indexing the first 256 chars. So I then found this command I should be able to run in Kibana to update it.
PUT /notes-index/_mapping
{
"properties": {
"notes": {
"type": "text",
"ignore_above" : 5000
}
}
}
When I run that I get an error.
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [notes] has unsupported parameters: [ignore_above : 5000]"
}
],
"type": "mapper_parsing_exception",
"reason": "Mapping definition for [notes] has unsupported parameters: [ignore_above : 5000]"
},
"status": 400
}
So, I'm confused, is this notes field a text type or keyword type? I'm wondering if it's a text, and each analyzed word is a keyword? Is that how it works? Thanks.