anchor.diff:              index_range_folder(Folder, Acc0, IndexRef,
                                  {Bucket, FF, Min, StartKey},
                                  {Bucket, FF, Min, Max, StartKey, Incl})
  -    end.
  +    end;
  +get_index_folder(Folder, Acc, {index, Bucket, Q}, DataRef, IndexRef) ->
  +    UpgradeQ = riak_index:upgrade_query(Q),
  +    get_index_folder(Folder, Acc, {index, Bucket, UpgradeQ}, DataRef, IndexRef).
  +
   
   %% Iterates over a range of keys, for the special $key and $bucket
   %% indexes.
  
positive.code:        (_, Acc) ->
              Acc
      end;
  %% Transversion catch all
  fold_keys_fun(FoldKeysFun, {index, _FilterBucket, _Query}) ->
      fun({{Bucket, _FilterField, _FilterTerm, Key}, _}, Acc) ->
              FoldKeysFun(Bucket, Key, Acc);
         (_, Acc) ->
              Acc
      end.
  
  %% @private
  %% Return a function to fold over keys on this backend
  
negative.code:     end.
  
  %% @private
  %% V2 2i
  get_index_folder(Folder, Acc0, {index, Bucket, Q=?KV_INDEX_Q{filter_field= <<"$bucket">>}}, DataRef, _) ->
      %% get first key
  