Repository navigation
Conversation
…r_config `_CollectionConfigCreate.__add_props` read the vectorizers only from the deprecated `vectorizer_config`. A collection created with `vector_config=Configure.Vectors...` passed `None` to `Property._to_dict`, so `skip_vectorization` and `vectorize_property_name` went out as raw snake_case keys that the server ignores, and the property was vectorized anyway. Collect the vectorizers from `vector_config` too, so the property gets a `moduleConfig` entry per vectorizer, as it does for named vectors. Signed-off-by: Christopher Krah <48338417+chrikrah@users.noreply.github.com>
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Propertydocstring saysskip_vectorizationskips vectorization of the property, but on a collection created withvector_config=Configure.Vectors...it has no effect.__add_propsinclasses/config.pyreads the vectorizers fromvectorizer_configonly, so the two flags go out as raw snake_case keys, which the server drops. This collects the vectorizers fromvector_configtoo. No open issue covers it.Before, at
d1e185e:After:
config.add_propertyalready builds thismoduleConfigfromvectorConfig(config/executor.py:306), andtest_add_property_with_vectorizerasserts it against a server.One side effect: every property on this path now also sends
vectorizePropertyName: true, the documented default thatvectorizer_configandadd_propertyalready send, where today the server applies its own default of false (servermodules/text2vec-openai/ent/class_settings.go:31). I kept it consistent with those paths, since sending only the flags a user set would change_to_dictfor all three.Verification
Baseline on
d1e185eis564 passed, 1 skipped, so the delta is the one new test. Revertingclasses/config.pyand keeping it gives1 failed, 564 passed.@g-despot are you fine with that default flip here, or should
_to_dictstop sending unset flags everywhere in a separate PR?