diff --git a/index.go b/index.go index 9aa1b7ac..3786f52b 100644 --- a/index.go +++ b/index.go @@ -2,7 +2,6 @@ package core import ( "fmt" - "sort" "strings" ) @@ -46,11 +45,16 @@ func (index *Index) Equal(dst *Index) bool { if len(index.Cols) != len(dst.Cols) { return false } - sort.StringSlice(index.Cols).Sort() - sort.StringSlice(dst.Cols).Sort() for i := 0; i < len(index.Cols); i++ { - if index.Cols[i] != dst.Cols[i] { + var found bool + for j := 0; j < len(dst.Cols); j++ { + if index.Cols[i] == dst.Cols[j] { + found = true + break + } + } + if !found { return false } }