Hello,
I'm trying to retrieve only 128 characters of a text field I'm storing due to the fact that the text field is often extremely large, but for preview purposes I'd still like to retrieve part of that field without significant delay over slower connections.
Truncate filter seemed to match, but after testing it on the multi-field, the stored value seems to be the same as the original value.
"truncate_keyword_analyzer": {
"type": "custom",
"tokenizer": "keyword",
"filter": [
"truncate_filter"
]
}
And
"content": {
"type": "text",
"norms": false,
"analyzer": "standard",
"fields": {
"preview": {
"type": "text",
"store": true,
"index": false,
"norms": false,
"analyzer": "truncate_keyword_analyzer"
}
}
}
When the content field has, for example: "All I want for Christmas is a truncated text field", the content.preview field would have "All I want for Christmas", but it doesn't.
Is there something wrong with the current setup ? Should I look into other filters or tokenizers ? Or is this just not possible at the moment ?
Thanks!