Skip to content

6.0.0-rc

Pre-release
Pre-release

Choose a tag to compare

@greenrobot-team greenrobot-team released this 17 Nov 06:18
· 20 commits to main since this release

Highlights

  • Faster vector search, typically 2-4x, while using 1/8 of the memory
  • Late init of vector index parameters at runtime (e.g. the number of dimensions)
  • Vector search with other conditions (filters) now returns the nearest matching objects
  • Sync: efficient resync, e.g. after changing filter variables
  • Sync: P2P Mesh Sync to exchange data without a server (Android)
  • Kotlin: experimental KSP support (instead of kapt)

General improvements and changes

  • Requires Android apps to compile with SDK 36 (Android 16).
  • Update Android and JVM libraries to database version 6.0.0-rc-2026-11-13.
  • Experimental support for KSP: when the plugin detects the KSP plugin (com.google.devtools.ksp), it will configure the new experimental KSP processor #1075
    • Supports inline value classes like UInt.
    • Supports @get:JvmName to rename the getter of a property used in generated code.
  • Admin: modernized user interface based on Vue.js 3 and Material Design 3
  • Admin: optimized pages now loading faster
  • Android: log messages now use the logcat tag "ObjectBox" (previously "Box")
  • Closing a store with an open transaction created in the same thread now aborts the transaction with a warning instead of entering an infinite loop (still a programming error to avoid).
  • Internal fixes and improvements
  • The Android database libraries no longer prevent R8 from minifying an Android app build ("Missing classes detected while running R8.").
  • objectbox-kotlin, objectbox-rxjava3 and objectbox-meshsync-android: require at least Kotlin compiler and standard library 2.2.0.
  • ToOne: setAndPutTarget() and setAndPutTargetAlways() actually create the relation to the source object when the target object is new (its ID is 0).
  • Query: setParameters() supports flex key/value conditions with integer and floating point values, e.g. of equalKeyValue(key, long) or greaterKeyValue(key, double).
  • Queries: remove deprecated containsKeyValue() condition, use the equalKeyValue() condition instead.
  • Admin: remove deprecated AndroidObjectBrowser helper class, use Admin instead.
  • Admin: make keep-alive service compatible with Android 14 and newer.
  • ObjectBox Gradle plugin
    • Requires at least Gradle 8.3.
    • When using built-in Kotlin with Android Gradle Plugin 9, applies AGPs custom kapt plugin or suggests to add it, adds the ObjectBox Kotlin dependency.
    • Error when an index or a relation uses an existing UID, prevent creating duplicate UIDs for them
  • ObjectBox Maven plugin: release 1.4.0-beta.1, supports transforming entity classes with Java 11 byte code (class file major version 55).

Vector search

  • Vector quantization with TurboQuant enables much faster searches while preserving quality
    • New indexes with at least 32 dimensions hold their vectors in memory as TurboQuant4 (TQ4) by default: 1/8 of the memory of full-precision vectors, i.e. 8x the vectors fit in the same memory. Existing indexes keep running without quantization, unless they set one or are re-indexed.
    • The stored vectors remain full-precision: changing the quantization requires no data migration and no re-indexing.
    • Faster searches at the same recall (0.9-0.99): 1.5-2.4x on MNIST (784 dimensions), NYTimes (256) and DBpedia OpenAI embeddings (1536); about the same (0.9-1.25x) on lower dimensions like SIFT (128) and GloVe (100)
    • Faster index builds: 1.3-2.9x, growing with the dimensions
    • Searches rescore with full-precision vectors (from search level 4 on), so the results keep exact distances
    • To use another quantization, set @HnswIndex(quantization = ...), see VectorQuantization: e.g. SCALAR_QUANT_8 (1/4 of the full-precision memory; the most accurate estimates; for low to medium dimensions) or TurboQuant with 1, 1.5, 2 and 3 bits (to save memory at high dimensions).
  • Faster vector search without quantization: 1.2-2.8x the search speed of version 5.4.2 (same parameters and recall); also faster index builds (e.g. 1.9x for GloVe).
  • Simplified configuration: instead of tuning HNSW parameters like neighborsPerNode and indexingSearchCount yourself, choose one of 10 levels from fast to high quality (recall), handpicked from benchmarks on several public datasets.
    • Search levels trade search speed for quality: per query, e.g. Doc_.embedding.nearestNeighbors(vector, 10).searchLevel(VectorSearchLevel.L6_QUALITY) or Query.setParameterSearchLevel(), or set the default level of an index with @HnswIndex(searchLevel = ...) (default: VectorSearchLevel.L4_BALANCED). Previously, the advice was to search for more results than needed to improve quality; prefer a search level instead.
    • Build levels trade indexing time and memory for graph quality, for data that does not reach your recall target at the highest search levels: @HnswIndex(buildLevel = ...), see VectorBuildLevel.
    • The individual parameters remain available for fine-tuning; new are oversampling and rescoring, per query (e.g. nearestNeighbors(...).rescoreFactor(...) or Query.setParameterRescoreFactor()) and per index (e.g. @HnswIndex(quantizationRescoreFactor = ...)).
    • Property.nearestNeighbors() now returns NearestNeighborQueryCondition, which offers these search parameters. Code compiled against a previous version needs to be recompiled. The old query API (QueryBuilder) offers them as e.g. vectorSearchLevel().
  • Late init for HNSW indexes with dimensions (and other parameters) known only at runtime, e.g. if the embedding model is chosen at runtime: flag the index with @HnswFlags(lateInit = true) (makes @HnswIndex(dimensions) optional) and set its parameters after opening the store with BoxStore.initHnswIndex(property, HnswIndexParams); they are persisted and can be changed later (e.g. for another embedding model). To remove the objects instead of indexing them, pass an HnswInitMode. BoxStore.getHnswIndexParams() returns the parameters in effect.
  • Reproducible graph builds, e.g. for tests: HnswIndexParams.randomSeed() seeds the random levels of new graph nodes (default: a random seed).
  • Nearest neighbor search with other conditions now returns the nearest among the matching objects (previously: the nearest of all objects, of which only the matching ones remained, often fewer than requested). Few candidates are searched by brute force; otherwise, the graph search accepts only matching objects. Both limits are tunable per index (@HnswIndex(bruteForceMaxCandidates = ..., filteredSearchMaxNodes = ...); default: 10,000 candidates and 25,000 explored nodes) and per query (e.g. nearestNeighbors(...).bruteForceMaxCandidates(...) or Query.setParameterBruteForceMaxCandidates()).
  • Faster removal of objects from HNSW indexes at similar search quality: 7-45x the speed of version 5.4.2.
  • The default indexingSearchCount (efConstruction) is now 128 instead of 100, e.g. on NYTimes: 1.55x the search speed at a recall of 0.9, and a maximum recall of 0.960 instead of 0.947. Existing indexes keep their value (unless specified) and are not re-indexed.
  • Breaking change: removed @HnswFlags(reparationLimitCandidates). Removing objects from an HNSW index is fast now, so the database no longer supports this flag.

Sync

  • New Mesh Sync API: peer-to-peer (P2P) synchronization between sync clients without a central server.
    • Attach a MeshConfig via SyncBuilder.mesh() and query the running mesh via SyncClient.getMesh() (state, connected peer count, statistics counters). Mesh configurations are created by ObjectBox platform libraries that provide a mesh network (transport).
    • New artifact objectbox-meshsync-android: provides the mesh network for Android using Google Nearby Connections. Add it next to the Sync variant of the Android library (like objectbox-sync-android) and create a mesh configuration with AndroidMeshSync.createConfig(context, meshId). It includes the permissions required by Nearby Connections and the play-services-nearby dependency. See its README for details.
    • New MeshConfig option txLogMaxAgeSeconds() (age-based pruning of the local TX logs; default: 8 hours).
  • Requires a server that supports Sync protocol version 12.
  • New resync: SyncClient.requestResync() reconciles a client with the server while keeping its local data and only transferring the differences (compares object IDs and content hashes; requires a server supporting Sync protocol version 12). Advanced tuning (typically not needed): SyncBuilder.resyncAssumedChanges() and SyncClient.setResyncAssumedChanges().
  • Changed sync filters (e.g. changed filter variables) now resync instead of resetting the client's data (with servers supporting Sync protocol version 12); applyFilterVariables() reconnects to apply changed variables.