I have space peoples:
- id
- name
- age
with two indexes:
peoples = box.schema.space.create('peoples', {engine = 'memtx', field_count = 3, if_not_exists = true})
peoples:create_index('primary', {type = 'TREE', unique = true, parts = {1, 'unsigned'}, if_not_exists = true})
peoples:create_index('by_name_age', {type = 'TREE', unique = false, parts = {2, 'STR', 3, 'unsigned'}, if_not_exists = true})
and with data:
peoples:auto_increment{ 'name_1', 10 }
peoples:auto_increment{ 'name_1', 11 }
peoples:auto_increment{ 'name_1', 12 }
I need select peoples by name and by age more than some value. For example, I want to select all 'Alex' with age > 10, waiting for the next result:
[1, 'Alex', 11]
[2, 'Alex', 12]
I try to execute the query:
peoples.index.by_name_age:select({'Alex', 10}, {{iterator = box.index.EQ},{iterator = box.index.GT}})
but get the result
[1, 'Alex', 10]
How can I use different iterators for name and age index parts?