How to query on Hashmap value by java client

i wants to query on bin containing maps as a value by java client. There are more than 6cr records in one set and many record have frequency as map value. I wants all “id” containing “3651c8e0-fc6f-11e8-92d8-000c542971”. Please help.

{         
          "email": "abhinavsinghal2009@gmail.com",
          "name": "Dre",
          "frequency": {
            "id": "3651c8e0-fc6f-11e8-92d8-000c542971"
          }
}

Indexes can be created on mapkeys and values and they can be queried like normal AQL queries.

In case of Java client, Statement can be used for the same.

Also, without using the index on it, you can use MapOperations class which has a function for getbyValue.

I am not able to create index on map values. I have one sets containing more than 20 m records and in which one bin containing 2 m records with String values and 4 m records with map as values. as per your solution, i have to create index and query. But couldn’t index the set. Can you please provide the syntax and example/reference to solve this. I am left with one solution to Async Scan through java client and identify the records. Please help.

Have you read Indexing on Map Elements? Ping back if there is anything needing clarified.

aql> CREATE MAPKEYS INDEX index_on_mapkeys ON test.demoset (mapkeys_bin) string