* include document & image objects into grpc API
* introduce image and object to rest api
* minor refactoring
* rename Vector -> VectorInternal
* decompose vector data structures
* add schema
* fmt
* grpc docs
* fix conversion
* fix clippy
* fix another conversion
* rename VectorInput -> VectorInputInternal
* replace grpc TryFrom with async functions
* fmt
* replace rest TryFrom with async functions
* add image and object into query rest
* separate inference related conversions
* move json-related conversions into a separate file
* move vector-related transformations into a separate file
* move more vector related-conversions into dedicated module
* define mmap geo index
fix compilation
deleted flags
load new mmap
geo index tests
fix tests
fix build after rebase
add files list
* refactor get_stored_sub_regions output type
* review remanings
* mmap geo index api
* fix after rebase
* map index: fix reachable code marked as unreachable
* plumber work to get mmap text index to interfaces
* test: add fixture for mmap text index, always create mmap segment
* various fixes
- ensure dir is created for mmap
- implement is_on_disk() for text index
- invert deleted condition for filter in mmap inverted index
* update grpc docs and openapi
* implement return of files
* review nit
* fix after rebase
---------
Co-authored-by: generall <andrey@vasnetsov.com>
* gRPC API for Distance Matrix
* generate API docs
* apply correct limit to sample
* add JWT tests
* pluralitiy
* fix COO naming
* drops COO as it trips codespell and is redundant
* clarify docs
* move FacetIndex into facet_index.rs
* add support for integer facets
* add support for uuid facets
* use separate internal structure
* rename FacetValue::Keyword into FacetValue::String in REST
* fix after rebase
* Migrate uuid index to mmap
* add uuid numeric index
* select correct index + tenants
* Only serialize if necessary
* select correct index
* reset Cargo.toml
* review: use only map index for uuid for now
---------
Co-authored-by: generall <andrey@vasnetsov.com>
* Add and fix missing timeout in the retrieve APIs
* no need for extra timeout handling as single ops are doing it
* don't surface timeout too high in shard transfer infra
* add todos for future work
* update timeout after first query
* add UuidIndex
* fix clippy
* rebase to dev
* update api docs
* don't use wrapper type for Uuid index
* rebase to `dev`
* remove existence checking
* rename UuidPayloadKeyType => UuidIntType
* apply review changes
* rebase to dev
* post-rebase fixes
* Improve estimation
* Improve naming
* Apply suggestions from code review
Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
* use u128 in histogram and improve uuid sorting
* Also allow defragmentation for completely random Uuids
---------
Co-authored-by: generall <andrey@vasnetsov.com>
* expose random sampling query
* fix random query rescoring
* only ignore offset when there are no prefetches
* fix offset and with_payload/with_vector
* gen grpc docs
* make tests less flaky
* gen openapi schema
* Remove suffixed spaces
---------
Co-authored-by: timvisee <tim@visee.me>
* sorting
* migrate tests and move logic into SegmentBuilder
* add test and improve implementation
* improve code
* review
* code review improvements
* add index building to test
* Do not clone ranges
* Resolve clippy warnings due to recent PR on dev
* review suggestions
* Defragmentation in api (#4684)
* add tenant config to api
* deduplicate used defragmentation keys
* rename is_tenant to is_primary
* use all values to defrag key
* rename is_primary -> is_tenant
* update schema
---------
Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: timvisee <tim@visee.me>
* Add resharding status to API
* Report human readable resharding status in cluster info
* Fix delete stage not showing shard IDs
* Update OpenAPI spec
* Temporarily hide resharding operations in cluster info if empty
We'll enable it again to always be included when releasing resharding
* Remove resharding details from cluster info in gRPC until release
---------
Co-authored-by: timvisee <tim@visee.me>
* Add serde/validate attributes to resharding operations, matching others
* Fix broken comment
* Add debug message for resharding driver entering stages
* Fix shard transfer start setting state of wrong replica for resharding
* Remove obsolete clones
* Add target shard ID to shard key, add relevant gRPC types
* Move target shard ID below source shard ID field
* Rename collection_name to collection_id
* Reformat
* Transferring point batches must merge points in case of resharding
* In resharding state, sync list of peers on start
* Add logic for setting replica set state through consensus dispatcher
* Properly start resharding transfer
* Properly finish resharding transfers, set shard state correctly
* Fix shard transfer initialisation with different target shard
* Fix shard state handling with resharding on all nodes on transfer start
* Don't reset locally disabled state if only existing shard is resharding
* Add important TODOs
* Update OpenAPI and gRPC specification
* Elaborate on some logic in code with comments
* Use user configured shard transfer method for replication
* Add debug assert, on transfer start we should not replace existing shard
* On transfer start, be aware of different sender/receiver local states
This fixes transfers where we might not have a replica on all nodes
* Fix shard transfer not setting cutoff point on target shard
* While resharding, migrate shards in numerical order
* On shard transfer initialisation, ensure transfer targets given shard
* universal-query: add with_lookup to query API definition
* fix consistency doc check
* lookup_from and not lookup_with
* clean import
* improve doc for lookup location wrt using
* Suggestions for descriptions
---------
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
in grpc:
- restructure `ContextInput`, so that it becomes easy to handle both pairs and positive/negative lists in the future
in rest:
- restructure context queries so that they don't repeat the label in order to be used . E.g. turn `{ query: { context: { context: [ ... ] } } }` into `{ query: { context: [ ... ] } }`
- fixes fusion so that `{query: { fusion: "rrf" } }` actually works
both:
- renames `RecommendInput` positives and negatives to singular (same as in reco api)
* add `query` to shard trait
* add missing conversions for query
* update grpc docs
* Query response has intermediate results
* add ShardQueryResponse description
* move pub use to the top, keep only one way of reaching reexports
* introduce QueryContext, which accumulates runtime info needed for executing search
* fmt
* propagate query context into segment internals
* [WIP] prepare idf stats for search query context
* Split SparseVector and RemmapedSparseVector to guarantee we will not mix them up on the type level
* implement filling of the query context with IDF statistics
* implement re-weighting of the sparse query with idf
* fmt
* update idf param only if explicitly specified (more consistent with diff param update
* replace idf bool with modifier enum, improve further extensibility
* test and fixes
* Update lib/collection/src/operations/types.rs
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
* review fixes
* fmt
---------
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
* Add grey color for collection info status
* Restructure locks in local shard info method
* Set collection status to grey if we have pending optimizations
* Update OpenAPI specification and gRPC documentation
* Set optimizer status instead of color for compatibility reasons
* Only set and check for grey status if there are no other statuses