v6: quantizer settings use snake_case names the server never reads
还没有人认领这个 Issue。
评估
调研方向
从 src/main/java/io/weaviate/client6/v1/api/collections/quantizers/ 开始,并对照 issue 中列出的 server sources 检查 RQ、BQ、SQ 和 PQ records。验证 camelCase keys 的 serialization 和 deserialization,以及 PQ 的嵌套 encoder 结构;完成的标准是所有受影响的 settings 都使用 server 的确切名称进行 round-trip。
由索引模型根据 Issue 内容生成。
描述
Summary
The quantizer records use snake_case JSON names the server never reads. Weaviate parses these settings out of the config map by exact key, so everything except enabled, bits, segments, centroids and cache is silently dropped on write and null on read — on every index type, not just one. A user who sets a rescore limit never set one.
The mismatch
Java @SerializedName |
Server key | Server source |
|---|---|---|
rescore_limit (BQ, SQ, RQ) |
rescoreLimit |
entities/vectorindex/hnsw/rq_config.go:31, sq_config.go:25, flat/config.go:147 |
training_limit (PQ, SQ) |
trainingLimit |
hnsw/pq_config.go:49, sq_config.go:24 |
bit_compression (PQ) |
bitCompression |
hnsw/pq_config.go:46 |
encoder_type + encoder_distribution (PQ) |
nested encoder: {type, distribution} |
hnsw/pq_config.go:50, encoderFromMap:97, encoderDistributionFromMap:117 |
The server reads them like this — a plain map lookup, no case folding, no snake_case fallback:
// entities/vectorindex/hnsw/rq_config.go
if err := common.OptionalIntFromMap(rqConfigMap, "rescoreLimit", func(v int) {
and returns them under the same names:
type RQConfig struct {
Enabled bool `json:"enabled"`
Bits int16 `json:"bits"`
RescoreLimit int `json:"rescoreLimit"`
}
So the break is symmetric: what the client sends is ignored, and what the server returns does not bind to the client's fields.
Affected fields
src/main/java/io/weaviate/client6/v1/api/collections/quantizers/:
RQ.rescoreLimit,BQ.rescoreLimit,SQ.rescoreLimitSQ.trainingLimit,PQ.trainingLimitPQ.bitCompressionPQ.encoderType,PQ.encoderDistribution— these are flat components in Java but a nestedencoderobject on the server, so they need a shape change rather than just a rename
enabled, bits, segments, centroids and cache already match and are unaffected.
Suggested fix
Rename the annotations to the camelCase keys, and give PQ's encoder its nested shape. No alternate values are needed: the snake_case spellings were never valid on the wire, so no stored config uses them.
Version
- java-client 6.3.1 (present since the quantizer records were introduced)
- Weaviate 1.39.0
Found while investigating #606, which is unfixable in practice without this: locating a nested rq still yields a null rescoreLimit.
- 主要语言
- Java
- 星标
- 34
- 派生
- 30
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
weaviate/java-client 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 90/100
weaviate/java-client#621 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
weaviate/java-client#619 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
weaviate/java-client#615 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
weaviate/java-client#607 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
weaviate/java-client#603 ·
查看 weaviate/java-client 的全部 Issue
相似的 Issue
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 75/100
apache/flink-agents#1156 ·
-
area/connectors autoteam community connectors/source/shopify needs-triage team/use type/bug
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 85/100