Synchronising the file position of secondary indexes

sync_indexes

Synchronise the file position of secondary indexes


SYNTAX

sync_indexes file_id [, file_id]…

Synchronises the current file position of all secondary indexes for the specified file to the current main index file position. Unless this is done, each index maintains its own file position.

The sync_indexes command affects a subsequent next[u], nextkey, prev[u] or prevkey command on a secondary index.

Note that unlike the main index, a secondary index can have a key that is not unique. When read[u] or readkey is used on a secondary index, the record that is read is always the first record that has the supplied secondary index key values. The current values in the main key fields are not taken into account. If the secondary index key values are not unique, the record that is read may therefore not be the expected record.


RELATED TOPICS

Sculptor keyed files

Secondary indexes

File position