Hi,
I have a llist with following structure: llist
1. list1[abc,pqr,xyz]
2. list2[mnq, rxy, sdf]
3. list3[tyu,dfg,opi]
I have another list say search_list[abc, rtu, dfg]
. I have to find the elements in the search_list in llist and return the matched elements list.
My filter function call looks like this
if ( aerospike_llist_filter(&as, &err, NULL, &list1, &llist,
"search_filter", (as_list*)&args_list, &result_list) != AEROSPIKE_OK ) {
fprintf(stderr, " search_keywords :: error(%d) %s at [%s:%d]", err.code, err.message, err.file, err.line);
}
The LDT used is llist.
as_ldt llist; as_ldt_init(&llist, "test_list", AS_LDT_LLIST,
"src/lua/basic_udf.lua");
The args_list["test_list", search_list].
LUA module is as follows:
function search_filter(rec, bin_name, search_list)
file = io.open("/tmp/log.lua", "a")
io.write("Inside lua module");
my_elements = llist_lib.find(rec, bin_name, search_list, nil, nil, nil, nil)
io.write("I have %d elements in my LLIST", llist_lib.size(rec, bin_name));
for v in list.iterator(my_elements) do
io.write("element = %s", tostring(v))
end
io.close(file)
return my_elements end
After executing the code, I am getting the following error:
search_keywords :: error(125) AEROSPIKE_ERR_LARGE_ITEM_NOT_FOUND at
[src/main/aerospike/as_command.c:976]
Moreover, the logs in the lua module are never printed. I am suspecting that the lua module is not getting called. I have registered the module and verified it in aql. Can somebody help me?