anchor.diff:              <<"spatial">> := true
           }}, get_index_via_rest(Config, Worker, ?SPACE_ID, IndexName), ?ATTEMPTS)
       end, Workers).
  +
   
   query_geospatial_index(Config) ->
       Workers = [WorkerP1, WorkerP2, WorkerP3 | _] = ?config(op_worker_nodes, Config),
  
positive.code:         Config, WorkerP1, SpaceId, IndexName, ?MAP_FUNCTION(XattrName),
          false, [?PROVIDER_ID(WorkerP2)], #{}
      )),
      ?assertMatch(ExpError, Query(WorkerP1, #{}), ?ATTEMPTS),
      ?assertEqual(ExpGuids, Query(WorkerP2, #{}), ?ATTEMPTS),
  
      % support index on both providers and check that they returns correct results
  
negative.code:     Provider2 = ?PROVIDER_ID(WorkerP2),
      IndexName = ?INDEX_NAME(?FUNCTION_NAME),
      XattrName = ?XATTR_NAME,
      UserId = <<"user1">>,
  
      AllPrivs = privileges:space_privileges(),
      ErrorForbidden = rest_test_utils:get_rest_error(?ERROR_FORBIDDEN),
  
      %% CREATE
  
      Options1 = #{<<"update_min_changes">> => 10000},
  
      % creating index without SPACE_MANAGE_INDICES privilege should fail
      initializer:testmaster_mock_space_user_privileges(Workers, ?SPACE_ID, UserId, AllPrivs -- [?SPACE_MANAGE_INDICES]),
      ?assertMatch([], list_indices_via_rest(Config, WorkerP1, ?SPACE_ID, 100)),
      ?assertMatch(ErrorForbidden, create_index_via_rest(
          Config, WorkerP1, ?SPACE_ID, IndexName, ?MAP_FUNCTION(XattrName), false, [], Options1
      )),
      ?assertMatch([], list_indices_via_rest(Config, WorkerP1, ?SPACE_ID, 100)),
  
      % creating index with SPACE_MANAGE_INDICES privilege should succeed
      initializer:testmaster_mock_space_user_privileges(Workers, ?SPACE_ID, UserId, [?SPACE_MANAGE_INDICES, ?SPACE_VIEW_INDICES]),
      ?assertMatch(ok, create_index_via_rest(
          Config, WorkerP1, ?SPACE_ID, IndexName, ?MAP_FUNCTION(XattrName), false, [], Options1
      )),
      ?assertMatch([IndexName], list_indices_via_rest(Config, WorkerP1, ?SPACE_ID, 100), ?ATTEMPTS),
      ?assertMatch([IndexName], list_indices_via_rest(Config, WorkerP2, ?SPACE_ID, 100), ?ATTEMPTS),
  
      %% GET
  
      % viewing index without SPACE_VIEW_INDICES should fail
      initializer:testmaster_mock_space_user_privileges(Workers, ?SPACE_ID, UserId, AllPrivs -- [?SPACE_VIEW_INDICES]),
      lists:foreach(fun(Worker) ->
          ?assertMatch(ErrorForbidden, get_index_via_rest(Config, Worker, ?SPACE_ID, IndexName), ?ATTEMPTS)
      end, Workers),
  
      % viewing index with SPACE_VIEW_INDICES should succeed
      initializer:testmaster_mock_space_user_privileges(Workers, ?SPACE_ID, UserId, [?SPACE_VIEW_INDICES]),
      ExpMapFun = index_utils:escape_js_function(?MAP_FUNCTION(XattrName)),
      lists:foreach(fun(Worker) ->
          ?assertMatch({ok, #{
  