Skip to content

[BUG] Errors when creating the search indexes using the admin CLI #12

@arshia-shakudo

Description

@arshia-shakudo

Describe the bug

When following the readme guide, when creating the collections and indexes using the admin CLI we face issues with the search indexes when running:

cd src/whyhow_api/cli/
python admin.py setup-collections --config-file collection_index_config.json

The error logs are are:

 python admin.py setup-collections --config-file collection_index_config.json
Collection chunk already exists.
Created regular index '_id_' on collection 'chunk'.
Created regular index 'created_by' on collection 'chunk'.
Created regular index 'created_by_1_data_type_1_workspaces_1' on collection 'chunk'.
Created regular index 'workspaces_1' on collection 'chunk'.
Created regular index 'created_by_1_document_1_workspaces_1_date_type_1' on collection 'chunk'.
Failed to create search index 'vector_search_index' on collection 'chunk': Invalid invalid index definition, full error: {'ok': 0.0, 'errmsg': 'Invalid invalid index definition', 'code': 2, 'codeName': 'BadValue', '$clusterTime': {'clusterTime': Timestamp(1733409221, 1), 'signature': {'hash': b"t)\xd1U,\x85*\r'\xfb\xdc\xe1\xcc\xa5 \x8ah\xab\x87y", 'keyId': 7444298739201605638}}, 'operationTime': Timestamp(1733409221, 1)}
Collection document already exists.
Created regular index '_id_' on collection 'document'.
Collection graph already exists.
Created regular index '_id_' on collection 'graph'.
Created regular index 'name_1_created_by_1_workspace_1' on collection 'graph'.
Collection node already exists.
Created regular index '_id_' on collection 'node'.
Created regular index 'graph_1' on collection 'node'.
Created regular index 'update_one_node_index' on collection 'node'.
Failed to create search index 'node_index' on collection 'node': Invalid invalid index definition, full error: {'ok': 0.0, 'errmsg': 'Invalid invalid index definition', 'code': 2, 'codeName': 'BadValue', '$clusterTime': {'clusterTime': Timestamp(1733409221, 1), 'signature': {'hash': b"t)\xd1U,\x85*\r'\xfb\xdc\xe1\xcc\xa5 \x8ah\xab\x87y", 'keyId': 7444298739201605638}}, 'operationTime': Timestamp(1733409221, 1)}
Collection query already exists.
Created regular index '_id_' on collection 'query'.
Collection rule already exists.
Created regular index '_id_' on collection 'rule'.
Collection schema already exists.
Created regular index '_id_' on collection 'schema'.
Created regular index 'name_1_created_by_1_workspace_1' on collection 'schema'.
Collection task already exists.
Created regular index '_id_' on collection 'task'.
Created regular index 'createdAt_-1' on collection 'task'.
Collection triple already exists.
Created regular index '_id_' on collection 'triple'.
Created regular index 'graph_1' on collection 'triple'.
Created regular index 'created_by_1_graph_1_head_node_1_tail_node_1_type_1_properties_1_chunks_1' on collection 'triple'.
Created regular index 'update_one_triple_index' on collection 'triple'.
Created regular index 'chunks_1' on collection 'triple'.
Created regular index 'head_node_1' on collection 'triple'.
Created regular index 'tail_node_1' on collection 'triple'.
Failed to create search index 'triple_index' on collection 'triple': Invalid invalid index definition, full error: {'ok': 0.0, 'errmsg': 'Invalid invalid index definition', 'code': 2, 'codeName': 'BadValue', '$clusterTime': {'clusterTime': Timestamp(1733409221, 1), 'signature': {'hash': b"t)\xd1U,\x85*\r'\xfb\xdc\xe1\xcc\xa5 \x8ah\xab\x87y", 'keyId': 7444298739201605638}}, 'operationTime': Timestamp(1733409221, 1)}
Failed to create search index 'triple_vector_index' on collection 'triple': Invalid invalid index definition, full error: {'ok': 0.0, 'errmsg': 'Invalid invalid index definition', 'code': 2, 'codeName': 'BadValue', '$clusterTime': {'clusterTime': Timestamp(1733409221, 1), 'signature': {'hash': b"t)\xd1U,\x85*\r'\xfb\xdc\xe1\xcc\xa5 \x8ah\xab\x87y", 'keyId': 7444298739201605638}}, 'operationTime': Timestamp(1733409221, 1)}
Collection user already exists.
Created regular index '_id_' on collection 'user'.
Collection workspace already exists.
Created regular index '_id_' on collection 'workspace'.
Created regular index 'created_by_index' on collection 'workspace'.
Created regular index 'name_1_created_by_1' on collection 'workspace'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions