Alternative to lookup datatype?

I wanted to populate a description field using its corresponding key, code, and another index having a key, lookup_code, column, and a corresponding description column but without the lookup datatype I am finding it hard to achieve a lookup on the index level since lookup data type, as well as scripted fields, have been deprecated. How can I achieve the same?

Hi @captainzura195 Welcome to the community!

I think there's two approaches

Runtime field lookup, runtime fields are the new scripted fields.

Is executed at runtime so it's a little less performant and may not scale as well.

Or enrich processor which is done at ingest time and so the day that it's actually appended to the document and make search very fast.

Can you show me the Deprecation notices for You are referring to?

So right now the scenario is that we have a field "phase_status" which we want to add to new documents getting indexed based on the "phase_code" field in these documents.
So we have created an index "Lookup_Index" which has 2 fields "phase_status", "phase_code", eg values: 1: Tested, 2: Testing, 3: Deployed
So with basic enrich features, we are able to get this done to the newer documents getting added.
But when I wish to add this to older indexes that already have the field "phase_status", will enrich add another columnn with same name , add values to the same column?

No enrich will not work on previously indexed documents, in that case you will need to either reindex or use the runtime method.

Hmmm I guess you might be able to run an update_by_query with script to back fill the old docs

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