Relative Content

Tag Archive for elasticsearchopensearch

How can I handle large keyword fields in OpenSearch?

I have an app where I index data in OpenSearch. The data model is largely defined by the end users and not by myself. So, when a user says that they have a “string” field, I index it both as a text and keyword field in OpenSearch because I don’t know whether it’s a short, enum-style string or long-form text. So my field mappings look like:

How can I handle large keyword fields in OpenSearch?

I have an app where I index data in OpenSearch. The data model is largely defined by the end users and not by myself. So, when a user says that they have a “string” field, I index it both as a text and keyword field in OpenSearch because I don’t know whether it’s a short, enum-style string or long-form text. So my field mappings look like:

ElasticSearch – Field Types

Currently using elastic search Serverless, I have a field called street number , currently it’s stored as a text. It contains values which are both string and text:
[100, 101A, 102A, 103, 105-B, 150,]
My use case is I want to use a range query to get all street numbers between 100 & 110. It should output all values including the string values.
My questions is