Question about data types and adding new data types

Hi,

As part of a masters degree assignment I need to address some questions about the Elasticsearch to the developers. The question is:

I saw that Elasticsearch is capable of working with a variety of data types (for indexing and searching) and I am interested about how it works behind the scene, specifically about how would Elasticsearch adapt to new kinds of data in the future.

If you can't answer my question, do you know anywhere where I can get this information from?

Thank you for your time.

What do you mean by new kinds of data?

By kinds of data I mean field data types: Field data types | Elasticsearch Guide [7.16] | Elastic

So if I wanted to add support to a new custom data type so I can index it and use it on queries, how would I have to extend the code to allow this? Is it easy?

For example, if the geo_point data type didn't exist, what steps should be taken to add it?

The best thing to do would be to look at one of our existing plugins e.g. the annotated text field type and use the source as a template for your new field.
The basis of it is you define a plugin that registers itself in a field types registry. The base class MappedFieldType has methods that must be overwritten when creating documents or queries related to your custom field type.

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