diff --git a/index.go b/index.go index 5c7e06f05..93100e1da 100644 --- a/index.go +++ b/index.go @@ -129,12 +129,26 @@ func (i *Index) SetColumnLabel(v string) error { // ColumnLabel returns the column label. func (i *Index) ColumnLabel() string { - i.mu.Lock() + i.mu.RLock() v := i.columnLabel - i.mu.Unlock() + i.mu.RUnlock() return v } +// Options returns all options for this index. +func (i *Index) Options() IndexOptions { + i.mu.RLock() + defer i.mu.RUnlock() + return i.options() +} + +func (i *Index) options() IndexOptions { + return IndexOptions{ + ColumnLabel: i.columnLabel, + TimeQuantum: i.timeQuantum, + } +} + // Open opens and initializes the index. func (i *Index) Open() error { // Ensure the path exists.