Searching for the index of specific AAID

You currently have : A list of key value pairs:

[AAIDx:{}, AAIDy:{} , AAIDz:{}, ...]

You will have to modify it as a List of Lists with the Key being first element of the list. Like so:

[ [AAIDx, AAIDx:{ ...}], [AAIDy, AAIDy:{ ... }], [AAIDz, AAIDz:{....} ] ]

Here is my test output with the above modification to the data structure:

//Add record data
List<Value> aaidlist1 = new ArrayList<Value>();
aaidlist1.add(Value.get("AAID1"));
HashMap <String, Integer> mapAAID1 = new HashMap <String, Integer>();
mapAAID1.put("1234", 1800);
mapAAID1.put("4374", 1600);
mapAAID1.put("6876", 1600);
mapAAID1.put("inner_ttl", 1800);
HashMap <String, HashMap> mapAAID_1 = new HashMap <String, HashMap>();
mapAAID_1.put("AAID1", mapAAID1);
aaidlist1.add(Value.get(mapAAID_1));

List<Value> aaidlist2 = new ArrayList<Value>();
aaidlist2.add(Value.get("AAID2"));
HashMap <String, Integer> mapAAID2 = new HashMap <String, Integer>();
mapAAID2.put("7657", 900);
mapAAID2.put("5435", 500);
mapAAID2.put("inner_ttl", 900);
HashMap <String, HashMap> mapAAID_2 = new HashMap <String, HashMap>();
mapAAID_2.put("AAID2", mapAAID2);
aaidlist2.add(Value.get(mapAAID_2));

List<Value> aaidlist3 = new ArrayList<Value>();
aaidlist3.add(Value.get("AAID3"));
HashMap <String, Integer> mapAAID3 = new HashMap <String, Integer>();
mapAAID3.put("9878", 12000);
mapAAID3.put("4454", 1000);
mapAAID3.put("inner_ttl", 12000);
HashMap <String, HashMap> mapAAID_3 = new HashMap <String, HashMap>();
mapAAID_3.put("AAID3", mapAAID3);
aaidlist3.add(Value.get(mapAAID_3));

client.operate(null, myKey, ListOperation.append(lPolicy, binName, Value.get(aaidlist1)));
client.operate(null, myKey, ListOperation.append(lPolicy, binName, Value.get(aaidlist2)));
client.operate(null, myKey, ListOperation.append(lPolicy, binName, Value.get(aaidlist3)));

System.out.println("My List after mapInsert: "+ client.get(null, myKey));

Output:

My List after mapInsert: 
(gen:3),(exp:452752299),
(bins:(myListBin1:
[
[AAID1, {AAID1={6876=1600, 4374=1600, 1234=1800, inner_ttl=1800}}], 
[AAID2, {AAID2={7657=900, 5435=500, inner_ttl=900}}], 
[AAID3, {AAID3={9878=12000, inner_ttl=12000, 4454=1000}}]
]))

Now you can query using WILDCARD (only applies to List Values):

List<Value> aaidList = new ArrayList<Value>();
aaidList.add(Value.get("AAID2"));
aaidList.add(Value.get(Value.WILDCARD));

System.out.println(client.operate(null, myKey, ListOperation.getByValue("myListBin1", Value.ListValue.get(aaidList), ListReturnType.INDEX)));

System.out.println(client.operate(null, myKey, ListOperation.getByValue("myListBin1", Value.ListValue.get(aaidList), ListReturnType.VALUE)));

and the output is:

(gen:3),(exp:452752299),(bins:(myListBin1:[1]))
(gen:3),(exp:452752299),(bins:(myListBin1:[[AAID2, {AAID2={7657=900, 5435=500, inner_ttl=900}}]]))