Skip to content

Say that Chroma 1.3.0 applies the space of a schema only when the schema also turns an index on or off, and test it - #128

Merged
Laurianti merged 3 commits into
mainfrom
space-in-schema-130
Oct 13, 2026
Merged

Laurianti merged 3 commits into
mainfrom
space-in-schema-130

Conversation

@Laurianti

@Laurianti Laurianti commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Chroma 1.3.0 applies the space of a collection created with a schema only when the schema also turns an index on or off; with the space alone it keeps l2. docs/COMPATIBILITY.md says that 1.3.0 applies it in the request of this client and in plain HTTP, and the client messages and comments say that only 1.3.2 and later apply it.

  • Measured on 13 October 2026: a schema with the space cosine on #embedding, a record [1, 0] and a query of [0, 1], whose distance is 1 with cosine and 2 with l2. In plain HTTP:

    The schema also Chroma 1.3.0 Chroma 1.3.2
    nothing l2, distance 2.0 cosine, distance 1.0
    turns off the full-text search index of #document cosine, distance 1.0 cosine, distance 1.0
    turns off the string inverted index of a key cosine, distance 1.0 cosine, distance 1.0
    turns on the string inverted index of a key cosine, distance 1.0 cosine, distance 1.0
    turns off the string inverted index by default cosine, distance 1.0 cosine, distance 1.0

    With the space alone, 1.3.0 keeps l2 also with this client and with the Python client 1.3.0, on fresh containers, three times each.

  • Before: docs/COMPATIBILITY.md said that 1.3.0 applies the space in the request of this client and in plain HTTP. The message of CreateCollectionAsync and GetOrCreateCollectionAsync for another space said "only Chroma 1.3.2 and later apply the space with a schema".

  • Now: docs/COMPATIBILITY.md, docs/sparse-vectors-and-schema.md, the message and the comments say that 1.3.0 applies the space only when the schema also turns an index on or off, and that 1.3.2 and later always apply it. No change of behavior.

  • Tests:

    • The test of the space with a schema alone still runs from 1.3.2; a new one with an index turned off runs from 1.3.0. Both pass on 1.3.2, 1.5.9 and Chroma Cloud, and the new one on 1.3.0.
    • The message test fails with the client of main and passes with the change.
    • The whole suite passes on 1.5.9 and 0.6.3, and the client builds for netstandard2.0 and net462.

@Laurianti Laurianti changed the title Say that Chroma 1.3.0 keeps l2 for the space of a schema, also with this client and in plain HTTP Correct what the client says about the space of a schema on Chroma 1.3.0 and a null document in an update on 0.x, and test both Oct 13, 2026
@Laurianti
Laurianti force-pushed the space-in-schema-130 branch from 02edd24 to 5c5f242 Compare October 13, 2026 08:01
@Laurianti Laurianti changed the title Correct what the client says about the space of a schema on Chroma 1.3.0 and a null document in an update on 0.x, and test both Say that Chroma 1.3.0 applies the space of a schema only when the schema also turns an index on or off, and test it Oct 13, 2026
@Laurianti
Laurianti requested a balanced review from Copilot October 13, 2026 08:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The compatibility correction is consistently documented and covered by targeted tests, with only a minor naming concern.

1 open finding
What changed in this PR

Clarifies Chroma 1.3.0’s conditional handling of schema-defined spaces and adds regression coverage.

Changes:

  • Corrects compatibility documentation and diagnostics.
  • Tests space handling with an explicitly disabled index.
  • Refactors shared schema-space test logic.
File Description
docs/​sparse-vectors-and-schema.md Documents Chroma 1.3.0 behavior.
docs/​COMPATIBILITY.md Updates the compatibility matrix.
ChromaDB.Client/​ChromaClient.cs Clarifies diagnostics and comments.
ChromaDB.Client.Tests/​SparseVectorsAndSchemaTests.cs Updates diagnostic assertions.
ChromaDB.Client.Tests/​ClientTests.cs Adds integration coverage.
ChromaDB.Client.Tests/​ChromaTestsBase.cs Clarifies version gating.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ChromaDB.Client.Tests/ClientTests.cs Outdated
@Laurianti
Laurianti marked this pull request as ready for review October 13, 2026 09:06
@Laurianti
Laurianti requested a review from a team as a code owner October 13, 2026 09:06
@Laurianti
Laurianti merged commit 6041cb2 into main Oct 13, 2026
15 checks passed
@Laurianti
Laurianti deleted the space-in-schema-130 branch October 13, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants