From ba39f2ace087b9a2d910a7293c464813012f453d Mon Sep 17 00:00:00 2001 From: Dmitry Paramonov Date: Tue, 10 Dec 2024 17:33:00 +0300 Subject: [PATCH] fix: Remove indices which are not defined for a given set of fields --- agents-api/agents_api/models/docs/search_docs_by_embedding.py | 2 +- agents-api/agents_api/models/docs/search_docs_by_text.py | 2 +- agents-api/agents_api/models/execution/get_execution.py | 2 +- .../agents_api/models/execution/get_paused_execution_token.py | 2 +- .../agents_api/models/execution/list_execution_transitions.py | 2 +- agents-api/agents_api/models/execution/update_execution.py | 2 +- agents-api/agents_api/models/task/get_task.py | 2 +- agents-api/agents_api/models/user/get_user.py | 2 +- agents-api/agents_api/models/user/list_users.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/agents-api/agents_api/models/docs/search_docs_by_embedding.py b/agents-api/agents_api/models/docs/search_docs_by_embedding.py index 49ec069df..992e12f9d 100644 --- a/agents-api/agents_api/models/docs/search_docs_by_embedding.py +++ b/agents-api/agents_api/models/docs/search_docs_by_embedding.py @@ -91,7 +91,7 @@ def search_docs_by_embedding( snippet_counter[count(item)] := owners[owner_type, owner_id_str], owner_id = to_uuid(owner_id_str), - *docs:owner_id_metadata_doc_id_idx {{ + *docs {{ owner_type, owner_id, doc_id: item, diff --git a/agents-api/agents_api/models/docs/search_docs_by_text.py b/agents-api/agents_api/models/docs/search_docs_by_text.py index ce5319673..ac1a9f54f 100644 --- a/agents-api/agents_api/models/docs/search_docs_by_text.py +++ b/agents-api/agents_api/models/docs/search_docs_by_text.py @@ -90,7 +90,7 @@ def search_docs_by_text( candidate[doc_id] := input[owner_type, owner_id], - *docs:owner_id_metadata_doc_id_idx {{ + *docs {{ owner_type, owner_id, doc_id, diff --git a/agents-api/agents_api/models/execution/get_execution.py b/agents-api/agents_api/models/execution/get_execution.py index c4e30ab64..db0279b1f 100644 --- a/agents-api/agents_api/models/execution/get_execution.py +++ b/agents-api/agents_api/models/execution/get_execution.py @@ -52,7 +52,7 @@ def get_execution( ?[id, task_id, status, input, output, error, session_id, metadata, created_at, updated_at] := input[execution_id], - *executions:execution_id_status_idx { + *executions { task_id, execution_id, status, diff --git a/agents-api/agents_api/models/execution/get_paused_execution_token.py b/agents-api/agents_api/models/execution/get_paused_execution_token.py index 526a6012c..6c32c7692 100644 --- a/agents-api/agents_api/models/execution/get_paused_execution_token.py +++ b/agents-api/agents_api/models/execution/get_paused_execution_token.py @@ -55,7 +55,7 @@ def get_paused_execution_token( *executions { execution_id, }, - *transitions:execution_id_type_created_at_idx { + *transitions { execution_id, created_at, task_token, diff --git a/agents-api/agents_api/models/execution/list_execution_transitions.py b/agents-api/agents_api/models/execution/list_execution_transitions.py index d30e8595e..8931676f6 100644 --- a/agents-api/agents_api/models/execution/list_execution_transitions.py +++ b/agents-api/agents_api/models/execution/list_execution_transitions.py @@ -35,7 +35,7 @@ def list_execution_transitions( query = f""" ?[id, execution_id, type, current, next, output, metadata, updated_at, created_at] := - *transitions:execution_id_type_created_at_idx {{ + *transitions {{ execution_id, transition_id: id, type, diff --git a/agents-api/agents_api/models/execution/update_execution.py b/agents-api/agents_api/models/execution/update_execution.py index b485e34f8..f33368412 100644 --- a/agents-api/agents_api/models/execution/update_execution.py +++ b/agents-api/agents_api/models/execution/update_execution.py @@ -79,7 +79,7 @@ def update_execution( validate_status_query = """ valid_status[count(status)] := - *executions:execution_id_status_idx { + *executions { status, execution_id: to_uuid($execution_id), task_id: to_uuid($task_id), diff --git a/agents-api/agents_api/models/task/get_task.py b/agents-api/agents_api/models/task/get_task.py index ab6edb2c3..460fdc38b 100644 --- a/agents-api/agents_api/models/task/get_task.py +++ b/agents-api/agents_api/models/task/get_task.py @@ -63,7 +63,7 @@ def get_task( metadata, ] := input[task_id], - *tasks:task_id_agent_id_idx { + *tasks { agent_id, task_id, updated_at_ms, diff --git a/agents-api/agents_api/models/user/get_user.py b/agents-api/agents_api/models/user/get_user.py index 89f49dae1..69b3da883 100644 --- a/agents-api/agents_api/models/user/get_user.py +++ b/agents-api/agents_api/models/user/get_user.py @@ -85,7 +85,7 @@ def get_user( updated_at, metadata, ] := input[developer_id, id], - *users:developer_id_metadata_user_id_idx { + *users { user_id: id, developer_id, name, diff --git a/agents-api/agents_api/models/user/list_users.py b/agents-api/agents_api/models/user/list_users.py index cc857b1a1..f1e06adf4 100644 --- a/agents-api/agents_api/models/user/list_users.py +++ b/agents-api/agents_api/models/user/list_users.py @@ -88,7 +88,7 @@ def list_users( metadata, ] := input[developer_id], - *users:developer_id_metadata_user_id_idx {{ + *users {{ user_id: id, developer_id, name,