mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? Yes ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Refactoring ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? Yes pgmongo.enableVectorDiskANNIndex: default is off ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Refactoring vector search to support different index types in oss helio and pgmongo ### 1. Index type - helio: vector-ivf, vector-hnsw - pgmongo: vector-ivf, vector-hnsw, vector-diskann ### 2. Vector index creation - ParseIndexCreationSpecFunc - ValidateIndexCreationSpecFunc - GenerateIndexCreationCmdFunc ### 3. Vector search - ParseIndexSearchSpecFunc - ValidateIndexSearchSpecFunc ### 4. Planner and custom scan - GetIndexAccessMethodOidFunc - GetSimilarityOpOidByFamilyOidFunc - SetSearchParametersToGUCFunc - GetDefaultSearchParamBsonFunc - CalculateSearchParamBsonFunc ### 5. Test cases - bson_aggregation_pipeline_tests_vector_diskann - bson_aggregation_pipeline_tests_vector_hnsw - bson_aggregation_pipeline_tests_vector_ivf - bson_aggregation_pipeline_tests_vector_mongo
27 lines
769 B
C
27 lines
769 B
C
/*-------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
*
|
|
* include/vector/vector_planner.h
|
|
*
|
|
* Function declarations for vector index used in planner and custom scan.
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef VECTOR_PLANNER__H
|
|
#define VECTOR_PLANNER__H
|
|
|
|
#include <nodes/pathnodes.h>
|
|
#include <nodes/pg_list.h>
|
|
|
|
#include "io/helio_bson_core.h"
|
|
#include "vector/vector_utilities.h"
|
|
|
|
|
|
pgbson * CalculateSearchParamBsonForIndexPath(IndexPath *vectorSearchPath);
|
|
|
|
void SetSearchParametersToGUC(Oid vectorAccessMethodOid, pgbson *searchParamBson);
|
|
|
|
void TrySetDefaultSearchParamForCustomScan(SearchQueryEvalData *querySearchData);
|
|
|
|
#endif
|