From 9cc8f8831080522ee6eb1b0ae23185ca67a93897 Mon Sep 17 00:00:00 2001 From: ozanarmagan Date: Tue, 24 Oct 2023 19:12:18 +0300 Subject: [PATCH] Fix sort by vector query --- include/field.h | 1 + test/collection_sorting_test.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/field.h b/include/field.h index 8cf4e773..0e55142f 100644 --- a/include/field.h +++ b/include/field.h @@ -572,6 +572,7 @@ struct sort_by { missing_values = other.missing_values; eval = other.eval; reference_collection_name = other.reference_collection_name; + vector_query = other.vector_query; } sort_by& operator=(const sort_by& other) { diff --git a/test/collection_sorting_test.cpp b/test/collection_sorting_test.cpp index 366f2f93..deb6ad4f 100644 --- a/test/collection_sorting_test.cpp +++ b/test/collection_sorting_test.cpp @@ -2471,7 +2471,7 @@ TEST_F(CollectionSortingTest, InvalidVectorDistanceSorting) { ASSERT_EQ("sort_by vector_distance is only supported for vector queries, semantic search and hybrid search.", results.error()); } -TEST_F(CollectionSortingTest, DISABLED_TestSortByVectorQuery) { +TEST_F(CollectionSortingTest, TestSortByVectorQuery) { std::string coll_schema = R"( { "name": "coll1",