Files
Zinan Ren f4896e9c81 Merged PR 1670376: [ReleaseValidation] Add release validation tests for hnsw/diskann/filtering/compression
### Does this PR have any customer impact?
No
### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Testing
### 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?
No
### ChangeLog (Refer [Template](../oss/CHANGELOG.md))

### Description
1. Check the max dimensions when creating the vector index, previously checked by pgvector
2. Add the following release validation tests:
- HNSW index (M40 and above)
- DiskANN index (M30 and above)
- Filtering search (GA)
- Exact search (GA)
- Compression half (GA)
- Compression PQ (GA)

----
#### AI description  (iteration 1)
#### PR Classification
This pull request implements new vector search release validation tests and updates the backend’s vector index dimension checks and error messaging.

#### PR Summary
The changes add comprehensive release validation tests for vector search covering various compression types (PQ, half), index kinds (ivf, hnsw, diskann), filtering, and exact match scenarios.
- `outerLoop/releaseValidation/testSpecs/` now includes multiple new JSON spec files (e.g. ValidateVectorSearchCompressionPQ.json, ValidateVectorSearchCompressionHalf.json, ValidateVectorSearchDiskANN.json, ValidateVectorSearchHNSW.json, ValidateVectorSearchFiltering.json, and ValidateVectorSearchExact.json) with updated expected errors.
- Test scripts in `ReleaseValidation.Tests.NodeJs/test/test_signoffTestsNodeJS.js` and C# signoff test file `SignoffTestsCSharp.cs` have been modified to enable and incorporate these new vector search tests.
- In `pg_documentdb/src/commands/create_indexes.c`, additional checks enforce maximum dimensions based on compression type (non-compressed: 2000, half: 4000, PQ: as defined) and update error messages accordingly.
- Several Postgres gateway and pgmongo files have been updated to remove obsolete regexes and return revised error codes (e.g. error code 67) and messages for exceeding vector dimension limits.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
2025-05-29 12:12:31 +08:00

31 lines
1.1 KiB
C

/*-------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* include/vector/vector_configs.h
*
* Vector index configuration
*
*-------------------------------------------------------------------------
*/
#ifndef VECTOR_CONFIGS__H
#define VECTOR_CONFIGS__H
/* Possible iterative scan modes for pre-filtering */
typedef enum VectorIterativeScanMode
{
VectorIterativeScan_OFF = 0,
/* Relaxed allows results to be slightly out of order by distance, but provides better recall */
VectorIterativeScan_RELAXED_ORDER = 1,
/* Strict ensures results are in the exact order by distance
*
* During the iterative scan, if an out-of-order vector is fetched, it will be ignored and continue to get next.
* This usually happens between different iterations(e.g. number of efSearch vectors as an iteration) of the index scan.
* The strict order skips the "right" vector to keep results in order, which may result in lower recall.
*/
VectorIterativeScan_STRICT_ORDER = 2
} VectorIterativeScanMode;
#endif