Possible to use truncate filter on keyword subfield to limit length?

I'm looking to overcome Fielddata is disabled on text fields by default. ... Alternatively use a keyword field...

I have a text field - it can be very large. I want to be able to test for field existence/length in script_score querying, so I'm thinking to add a keyword subfield on the text field and use a truncate filter to reduce the keyword data to a minimum amount. Is this possible?

If I could truncate the keyword subfield to a single character, that would be fine.

Related to this other question.

1 Like

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