I need to sort my elasticsearch documents by length of a text field. However, this field can sometimes contain a very large amount of text (up to 15000 characters). I am aware that the ignore_above parameter, which defaults to 256, can be used to limit the length of the text that is indexed.
Is it okay to change the ignore_above parameter to 15,000 to enable sorting by text length?
Alternatively, would it be a better solution to create an additional field, such as textLength, which contains the length of the text (e.g., textLength: 14000), and then sort by this textLength field?
Thanks