diff --git a/core/encoding.go b/core/encoding.go index b15b9196b5..eab401c7a2 100644 --- a/core/encoding.go +++ b/core/encoding.go @@ -259,11 +259,6 @@ func DecodeIndexDataStoreKey( if err != nil { return IndexDataStoreKey{}, err } - if i == len(indexDesc.Fields) { - if _, ok := val.String(); !ok { - return IndexDataStoreKey{}, NewErrInvalidFieldValue("docID is not a string") - } - } key.Fields = append(key.Fields, IndexedField{Value: val, Descending: descending}) } diff --git a/core/key_test.go b/core/key_test.go index 3d4fec5d9f..7791075a17 100644 --- a/core/key_test.go +++ b/core/key_test.go @@ -390,11 +390,6 @@ func TestDecodeIndexDataStoreKey_InvalidKey(t *testing.T) { val: encodeKey(colID, indexID, 5, false, 7, false, 9, false), numFields: 2, }, - { - name: "invalid docID value", - val: encoding.EncodeUvarintAscending(append(encodeKey(colID, indexID, 5, false), '/'), 5), - numFields: 1, - }, } indexDesc := client.IndexDescription{ID: indexID, Fields: []client.IndexedFieldDescription{{}}} for _, c := range cases {