Skip to content

Commit

Permalink
Update README and UPGRADE files
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljmarshall committed Nov 26, 2024
1 parent 5389e2f commit 4cfcbf1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ Compressing the vectors with product quantization is done as follows:
16, // number of subspaces
256, // number of centroids per subspace
true); // center the dataset
ByteSequence<?>[] compressed = pq.encodeAll(ravv);
// Note: before jvector 3.1.0, encodeAll returned an array of ByteSequence.
PQVectors pqv = pq.encodeAll(ravv);
// write the compressed vectors to disk
PQVectors pqv = new PQVectors(pq, compressed);
pqv.write(out);
}
```
Expand Down
14 changes: 14 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Upgrading from 3.0.x to 3.1.x

## Critical API changes

- `VectorCompressor.encodeAll()` now returns a `CompressedVectors` object instead of a `ByteSequence<?>[]`.
This provides better encapsulation of the compression functionality while also allowing for more efficient
creation of the `CompressedVectors` object.
- The `ByteSequence` interface now includes an `offset()` method to provide offset information for the sequence.
any time the method `ByteSequence::get` is called, the full backing data is returned, and as such, the `offset()`
method is necessary to determine the offset of the data in the backing array.
- `PQVectors` constructor has been updated to support immutable instances and explicit chunking parameters.
- The `VectorCompressor.createCompressedVectors(Object[])` method is now deprecated in favor of the new API that returns
`CompressedVectors` directly from `encodeAll()`.

# Upgrading from 2.0.x to 3.0.x

## Critical API changes
Expand Down

0 comments on commit 4cfcbf1

Please sign in to comment.