Return search results fields by a mapping document using ElasticSearch

I am indexing the following document as follows:

{
            "_index": "transactions",
            "_type": "transaction",
            "_id": "1",
            "_score": 1,
            "_source": {
               "title": "another backup",
               "action": "3"
            }
         }

Now let's assume I have a another static document which holds all mappings
for the actions:

{
            "_index": "transactions",
            "_type": "actions",
            "_id": "1",
            "_score": 1,
            "_source": {
               "3": "backup",
               "2": "upload",
               "1": "AnotherAction"
            }
         },
  1. Is it possible to configure ES so when it returns document of type:
    /transactions/transaction/?

It will map the action field value into the value which stored at
transactions/actions/1 ?

So when I do GET /transactions/transaction/_search

Ill get something like this:

{
                "_index": "transactions",
                "_type": "transaction",
                "_id": "1",
                "_score": 1,
                "_source": {
                   "title": "another backup",
                   "action": "backup"
                }
             }

If it's possible how I do that? if not what other way is possible to index
such documents with properties values as "enums" while knowing that their
values might change in the future.

thanks,
ray.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/082f53b0-6e34-4979-8024-3274b43de9f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.