Our datastructure is in the following format. Each Record has two bins, one has a map and other one has string value. We created index on MAPKEYS, and trying to query the data using an UDF in the following format:
aql> aggregate test.check_password(‘hii’) on test.user in MAPKEYS where pids = ‘test2’
Error: (201) AEROSPIKE_ERR_INDEX_NOT_FOUND
whereas the normal query works
aql> select * from test.user in MAPKEYS where pids = ‘test2’
returns some data
UDF with index on other bin also works.
Please let me know how to apply filter on the data queried on MAPKEYS index. Also is there any way we can limit the data in UDF (server side)
This might be a bug in AQL or a missing bit of functionality. What I’m curious about is how you’re using AQL. It’s a tool for inspecting your data, managing indexes, managing UDFs, and applying UDFs to the records in a specific set or that match a query. It’s also good for debugging your Lua, which may be your purpose.
If you’re trying to do things programmatically it would be best to write your code in Python, Java, or any other programming language that has an Aerospike client.