You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Note:** The `$range` operator supports values within **[0 - 999]**. Normalize larger values before upserting.
225
227
228
+
### Filter Performance Tuning
229
+
230
+
Two parameters control how filters are applied during search:
231
+
232
+
**`prefilterCardinalityThreshold`** — controls the cutover between prefiltering and postfiltering:
233
+
-**Prefilter** (default for small result sets): filters are applied *before* the ANN search, scanning only matching vectors. Fast when the filter is selective.
234
+
-**Postfilter**: the ANN search runs first, then results are filtered. Used when the estimated number of matches exceeds the threshold.
235
+
236
+
**`filterBoostPercentage`** — biases the ANN search toward vectors that match the filter (0–100). Higher values trade some recall for better filter alignment.
237
+
238
+
```java
239
+
List<QueryResult> results = index.query(
240
+
QueryOptions.builder()
241
+
.vector(newdouble[] {0.15, 0.25/* ... */})
242
+
.topK(5)
243
+
.filter(List.of(
244
+
Map.of("category", Map.of("$eq", "tech"))
245
+
))
246
+
.prefilterCardinalityThreshold(50000) // switch to postfilter above 50k matches
The version in `pom.xml` always carries a `-SNAPSHOT` suffix during development (e.g., `0.1.2-SNAPSHOT`). The CI/CD pipeline handles stripping it for releases automatically — you never need to edit the version manually.
618
+
619
+
### Branching Strategy
620
+
621
+
| Branch | Action | Publishes To |
622
+
| ------ | ------ | ------------ |
623
+
|`dev`| Push / merge | GitHub Packages (`pkg.github.com`) as a SNAPSHOT |
624
+
|`main`| Push / merge | Maven Central as a release + GitHub Release tag |
625
+
626
+
### Release Flow (main branch)
627
+
628
+
When code is pushed to `main`, GitHub Actions automatically:
629
+
1. Strips `-SNAPSHOT` from the version (e.g., `0.1.2-SNAPSHOT` → `0.1.2`)
630
+
2. Signs artifacts with GPG and deploys to Maven Central
631
+
3. Creates a git tag `v0.1.2` and a GitHub Release
632
+
4. Bumps the pom version to the next patch SNAPSHOT (`0.1.3-SNAPSHOT`) and commits back to `main`
633
+
634
+
### Snapshot Flow (dev branch)
635
+
636
+
When code is pushed to `dev`, GitHub Actions:
637
+
1. Builds and runs all tests
638
+
2. Publishes `0.1.2-SNAPSHOT` to GitHub Packages
639
+
640
+
> Sonatype Central Portal does **not** support SNAPSHOT versions, which is why snapshots go to GitHub Packages.
641
+
642
+
### Consuming a Snapshot
643
+
644
+
To use a snapshot version in another project, add the GitHub Packages repository and authenticate with a GitHub token that has `read:packages` scope:
0 commit comments