Add FoldKeysFun

Add the capability to pass FoldKeysFun into the index_query to allow for
compatability with riak backend requirements.
This commit is contained in:
martinsumner 2016-11-18 11:53:14 +00:00
parent e3004faa6e
commit ac223ced68
4 changed files with 83 additions and 87 deletions

View file

@ -70,21 +70,15 @@ recovr_strategy(_Config) ->
true = V == V4
end,
lists:nthtail(6400, AllSpcL)),
{async, TFolder} = leveled_bookie:book_returnfolder(Book1,
{index_query,
"Bucket6",
{"idx1_bin",
"#", "~"},
{true,
undefined}}),
Q = fun(RT) -> {index_query,
"Bucket6",
{fun testutil:foldkeysfun/3, []},
{"idx1_bin", "#", "~"},
{RT, undefined}}
end,
{async, TFolder} = leveled_bookie:book_returnfolder(Book1, Q(true)),
KeyTermList = TFolder(),
{async, KFolder} = leveled_bookie:book_returnfolder(Book1,
{index_query,
"Bucket6",
{"idx1_bin",
"#", "~"},
{false,
undefined}}),
{async, KFolder} = leveled_bookie:book_returnfolder(Book1, Q(false)),
KeyList = lists:usort(KFolder()),
io:format("KeyList ~w KeyTermList ~w~n",
[length(KeyList), length(KeyTermList)]),