Passing map to elastic search

hello
im new to es.I have a hashmap which contains values used for indexing.How could i use map to create index