I am following the tarantool documentation but I am getting an error while creating the index.
I would like to understand why this is failing, as I am following exactly the tutorial.
$ tarantool
tarantool: version 1.6.7-591-g7d4dbbb
type 'help' for interactive help
tarantool> box.cfg{listen = 3301}
2017-12-06 20:57:18.684 [15168] main/101/interactive C> version 1.6.7-591-g7d4dbbb
2017-12-06 20:57:18.684 [15168] main/101/interactive C> log level 5
2017-12-06 20:57:18.684 [15168] main/101/interactive I> mapping 1073741824 bytes for tuple arena...
2017-12-06 20:57:18.705 [15168] main/101/interactive I> initializing an empty data directory
2017-12-06 20:57:18.710 [15168] snapshot/101/main I> creating `./00000000000000000000.snap.inprogress'
2017-12-06 20:57:18.710 [15168] snapshot/101/main I> saving snapshot `./00000000000000000000.snap.inprogress'
2017-12-06 20:57:18.710 [15168] snapshot/101/main I> done
2017-12-06 20:57:18.713 [15168] iproto I> binary: started
2017-12-06 20:57:18.713 [15168] iproto I> binary: bound to 0.0.0.0:3301
2017-12-06 20:57:18.713 [15168] main/101/interactive I> ready to accept requests
---
...
tarantool> s = box.schema.space.create('tester')
2017-12-06 20:57:32.803 [15168] wal/101/main I> creating `./00000000000000000000.xlog.inprogress'
---
...
tarantool> s:create_index('primary', {
> type = 'hash',
> parts = {1, 'unsigned'}
> })
---
- error: 'Can''t create or modify index ''primary'' in space ''tester'': unknown field
type'
...
You are using Tarantool 1.6 so I believe you should have
parts = {1, 'NUM'}
in the tutorial example. The code you show ('unsigned') is for 1.7, so one option is to upgrade your version of Tarantool. Also in the docs, you can change between Tarantool 1.6, 1.7 and 1.8 in the upper-right-hand corner.