-
Notifications
You must be signed in to change notification settings - Fork 697
MB-59670: GPU-Accelerated Vector Search #2236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
d5baa81
11792f1
1b8ba1f
70f3684
9bf07fa
bc5d193
57d7edf
78dbc1f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -511,6 +511,9 @@ func compareFieldMapping(original, updated *mapping.FieldMapping) (*index.Update | |
| if original.VectorIndexOptimizedFor != updated.VectorIndexOptimizedFor { | ||
| return nil, fmt.Errorf("vectorIndexOptimizedFor cannot be updated for vector and vector_base64 fields") | ||
| } | ||
| if original.UseGPU != updated.UseGPU { | ||
| return nil, fmt.Errorf("useGPU cannot be updated for vector and vector_base64 fields") | ||
| } | ||
|
Comment on lines
+514
to
+516
|
||
| } | ||
| if original.IncludeInAll != updated.IncludeInAll { | ||
| return nil, fmt.Errorf("includeInAll cannot be changed") | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -83,6 +83,9 @@ | |||||||
| VectorIndexOptimizedFor string `json:"vector_index_optimized_for,omitempty"` | ||||||||
|
|
||||||||
| SynonymSource string `json:"synonym_source,omitempty"` | ||||||||
|
|
||||||||
| // Flag that indicates whether to use GPU for field indexing and searching | ||||||||
|
||||||||
| // Flag that indicates whether to use GPU for field indexing and searching | |
| // Applicable to vector fields only - enables GPU acceleration for indexing | |
| // and searching when the "gpu" field option is set in the mapping. |
Check failure on line 233 in mapping/field.go
GitHub Actions / coverage
undefined: index.GPU
Check failure on line 233 in mapping/field.go
GitHub Actions / test (1.23.x, windows-latest)
undefined: index.GPU
Check failure on line 233 in mapping/field.go
GitHub Actions / test (1.25.x, ubuntu-latest)
undefined: index.GPU
Check failure on line 233 in mapping/field.go
GitHub Actions / test (1.23.x, ubuntu-latest)
undefined: index.GPU
Check failure on line 233 in mapping/field.go
GitHub Actions / test (1.24.x, ubuntu-latest)
undefined: index.GPU
Check failure on line 233 in mapping/field.go
GitHub Actions / test (1.24.x, windows-latest)
undefined: index.GPU
Check failure on line 233 in mapping/field.go
GitHub Actions / test (1.24.x, macos-latest)
undefined: index.GPU
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -265,6 +265,11 @@ func validateVectorFieldAlias(field *FieldMapping, path []string, | |||||
| "(different vector index optimization values %s and %s)", effectiveFieldName, | ||||||
| effectiveOptimizedFor, aliasOptimizedFor) | ||||||
| } | ||||||
| if field.UseGPU != fieldAlias.UseGPU { | ||||||
| return fmt.Errorf("field: '%s', invalid alias "+ | ||||||
| "(different useGPU values %v and %v)", fieldAlias.Name, | ||||||
|
||||||
| "(different useGPU values %v and %v)", fieldAlias.Name, | |
| "(different useGPU values %v and %v)", effectiveFieldName, |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new UseGPU alias validation logic lacks test coverage. The TestVectorFieldAliasValidation function in mapping/mapping_vectors_test.go has comprehensive test cases for other vector field properties including VectorIndexOptimizedFor (see test "different_optimization_alias" at line 180-207), but no test case exists to verify that fields with different UseGPU values are correctly rejected as invalid aliases. A test case should be added to ensure this validation works as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message uses "useGPU" to refer to this field, but the JSON tag is "gpu" and the struct field is "UseGPU". Other similar error messages in the codebase use the exact field property name or descriptive text. For consistency with line 512's error message "vectorIndexOptimizedFor cannot be updated", this should use "gpu cannot be updated" or maintain the same camelCase style as the JSON tag throughout.