Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import io.endee.client.types.SpaceType;

CreateIndexOptions options = CreateIndexOptions.builder("my_vectors", 384)
.spaceType(SpaceType.COSINE)
.precision(Precision.INT8)
.precision(Precision.INT16)
.build();

client.createIndex(options);
Expand All @@ -92,7 +92,7 @@ client.createIndex(options);
| `spaceType` | Distance metric - `COSINE`, `L2`, or `IP` (inner product) | `COSINE` |
| `m` | Graph connectivity - higher values increase recall but use more memory | 16 |
| `efCon` | Construction-time parameter - higher values improve index quality | 128 |
| `precision` | Quantization precision | `INT8` |
| `precision` | Quantization precision | `INT16` |

### Create a Hybrid Index

Expand All @@ -102,7 +102,7 @@ Hybrid indexes combine dense vector search with sparse vector search. Add the `s
CreateIndexOptions options = CreateIndexOptions.builder("hybrid_index", 384)
.sparseDimension(30000) // Sparse vector dimension (vocabulary size)
.spaceType(SpaceType.COSINE)
.precision(Precision.INT8)
.precision(Precision.INT16)
.build();

client.createIndex(options);
Expand Down Expand Up @@ -365,7 +365,7 @@ IndexDescription info = index.describe();
System.out.println(info);
// IndexDescription{name='my_index', spaceType=COSINE, dimension=384,
// sparseDimension=0, isHybrid=false, count=1000,
// precision=INT8, m=16}
// precision=INT16, m=16}
```

### Check if Index is Hybrid
Expand All @@ -382,8 +382,8 @@ Endee supports different quantization precision levels:
import io.endee.client.types.Precision;

Precision.BINARY // Binary quantization (1-bit) - smallest storage, fastest search
Precision.INT8 // 8-bit integer quantization (default) - balanced performance
Precision.INT16 // 16-bit integer quantization - higher precision
Precision.INT8 // 8-bit integer quantization - balanced performance
Precision.INT16 // 16-bit integer quantization (default) - higher precision
Precision.FLOAT16 // 16-bit floating point - good balance
Precision.FLOAT32 // 32-bit floating point - highest precision
```
Expand Down Expand Up @@ -460,7 +460,7 @@ public class EndeeExample {
// Create a dense index
CreateIndexOptions createOptions = CreateIndexOptions.builder("documents", 384)
.spaceType(SpaceType.COSINE)
.precision(Precision.INT8)
.precision(Precision.INT16)
.build();

client.createIndex(createOptions);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/endee/client/Index.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public Index(String name, String token, String url, int version, IndexInfo param
this.count = params != null ? params.getTotalElements() : 0;
this.spaceType = params != null && params.getSpaceType() != null ? params.getSpaceType() : SpaceType.COSINE;
this.dimension = params != null ? params.getDimension() : 0;
this.precision = params != null && params.getPrecision() != null ? params.getPrecision() : Precision.INT8;
this.precision = params != null && params.getPrecision() != null ? params.getPrecision() : Precision.INT16;
this.m = params != null ? params.getM() : 16;
this.sparseDimension = params != null && params.getSparseDimension() != null ? params.getSparseDimension() : 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class CreateIndexOptions {
private SpaceType spaceType = SpaceType.COSINE;
private int m = 16;
private int efCon = 128;
private Precision precision = Precision.INT8;
private Precision precision = Precision.INT16;
private Integer version = null;
private Integer sparseDimension = null;

Expand Down