Commit Graph

535 Commits

Author SHA1 Message Date
Tim Visée
41b7a55e16 Fix multiple vector updates on same point in batch not working (#3386)
* Fix merge of vector operations, don't drop earlier updates on same point

* Add unit test for vector struct merging

* Add integration test for fix, also covering bug report
2024-03-05 16:47:28 +01:00
Tim Visée
3281be7402 Rename IntegerParams to IntegerIndexParams to be consistent with text (#3385) 2024-03-05 16:47:18 +01:00
Tim Visée
820ade7494 Parameterize integer index, allow lookup or range exclusively (#3380)
* Merge serde attributes

* Remove obsolete conversion

* Add integer type with parameters

* Make integer lookup and range parameters non-optional

* Add parameterized integer index types test

Co-authored-by: Di Zhao <diz@twitter.com>

* Cleanup

---------

Co-authored-by: Di Zhao <diz@twitter.com>
2024-03-05 16:47:07 +01:00
Arnaud Gourlay
7ceaf73a46 Handle empty sparse vector search (#3368) 2024-03-05 16:46:27 +01:00
Tim Visée
cf7f78b77b Custom thread priorities on Linux (#3235)
* Set high/low priority for consensus and HNSW threads

* Make setting thread priority Linux specific

* Fix compilation on non-Linux platforms

* Remove unused dependencies from Cargo.toml

* Rename function

* Add warning that setting lower nice is likely to fail
2024-03-05 16:44:33 +01:00
Tim Visée
88c493c051 Bump sysinfo to 0.30.3 (#3310)
* Bump sysinfo to 0.30.3

* Remove redundant refresh, new_with_specifics already refreshes
2024-03-05 16:44:24 +01:00
Arnaud Gourlay
680574347f Fix clippy 1.75 (#3270) 2024-01-29 15:23:22 +01:00
Andrey Vasnetsov
6632ba002c fix missing indexing values on set-payload operation (#3251)
* fix missing indexing values on set-payload operation

* Update function documentation, use conventional warning

* Don't deep match statements

* test: Update of payload on already indexed payload should work (#3253)

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: Kumar Shivendu <kshivendu1@gmail.com>
2023-12-19 19:31:00 +00:00
Ivan Pleshkov
772a8a75d9 sparse vectors with large indices support (#3230)
* sparse vectors with large indices support

* fix unit tests

* add tracker file to snapshot

* fix unit tests

* are you happy clippy

* fix config loading

* test with max value

* fix python tests

* fix consensus tests

* review remarks; acc test for inverted index
2023-12-19 19:28:13 +00:00
Ivan Pleshkov
b1aed910f2 Remove quantization update from hnsw index (#3221)
* remove quantization update from hnsw index

* test that hnsw was builded with presented quantization

* are you happy codespell

* prefer method over public field

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-12-19 19:27:57 +00:00
Arnaud Gourlay
8c93500998 Rename SimpleDenseVectorStorage (#3223) 2023-12-19 19:26:54 +00:00
Ivan Pleshkov
bd6bd55033 Rename VectorType to DenseVector (#3192)
* rename vectortype to densevector

* rename enums

* are you happy fmt

* openapi

* revert type renamings
2023-12-19 19:26:50 +00:00
Arnaud Gourlay
a229f2a56d Sparse vector index build handles missing points in storage (#3178)
* Sparse vector index build handle missing points in storage

* review

* spelling bee
2023-12-07 15:03:32 +01:00
Arnaud Gourlay
cafab322d0 Optimizer detects on_disk update sparse vector index (#3160)
* Optimizer detects on_disk update sparse vector index

* Rename sparse vector index on disk check function to remove ambiguity

* Appendable segments always have sparse index in memory

Don't try to force these segments to have their index on disk if
our collection configuration tells us to do it that way.

* Fix compilation warning

* Resolve merge conflict

* In indexing optimizer, only put sparse vectors on disk if big

* fix mutable->immutable optimization

* fix negation

* Disable config mismatch for sparse now, update sparse vector storage decision tree

* Fix compilation error due to TODO

* Fix flipped boolean

* simplify config mismatch logic

* simplify logic further

---------

Co-authored-by: timvisee <tim@visee.me>
Co-authored-by: generall <andrey@vasnetsov.com>
2023-12-06 22:16:37 +01:00
Ivan Pleshkov
8558399b4e Load non-appendable ram sparse vector index from file (#3154)
* internal sparse vector segment configs

update openapi

fix build

provide correct index type to fixtures

internal sparse vector segment configs

update openapi

fix build

load ram sparse index from file

fix spelling

add test

spelling error

use appendable flag to decide load or not

fix conflict

dont flush mmap when file is empty

* fix build

* set list of files for snapshot

* fix snapshots test

* fix codespell

* simple save-load unit test

* refactor InvertedIndex::files

* fix unit tests

* add debug_assert

* test all persistence loading cases
2023-12-06 22:16:30 +01:00
Arnaud Gourlay
4f90cf4af2 Minor API documentation fixes (#3173)
* Minor API documentation fixes

* sync
2023-12-06 17:22:42 +01:00
Ivan Pleshkov
17827a33a1 Internal sparse configs for segment (#3168)
* internal sparse vector segment configs

update openapi

fix build

provide correct index type to fixtures

rename grpc stuff

optional search threshold

update api consistency

* review fix

* rollback rename

* reger docs

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2023-12-06 17:22:14 +01:00
Arnaud Gourlay
9810823cb0 Fix sparse mmap snapshot (#3166) 2023-12-06 17:21:27 +01:00
Arnaud Gourlay
3889516650 Clean two sparse vectors todos (#3163) 2023-12-06 17:20:47 +01:00
Ivan Pleshkov
d5a705e0fa Sparse vectors advanced search api support (#3128)
* sparse vectors query scorer

plain search test without internals

fix sparse_vector_index_plain_search

fix async scorer build

fix unit tests

are you happy fmt

sparse index with full query support

fix benches, use exact flag to force plain search

add alias and comment to exact flag

fix tests

recommendations TODOs fix

add simple test

add todo

refactor index

test vs comparison dense and sparse discovery

are you happy fmt

propogate error from avg negatives

reuse filtered points list

rollback api changes

better discovery test

are you happy fmt

rollback openapi

fix build

fix tests

review remark recommendations

review remarks

review remarks

codespell

integrate plain search

Update lib/collection/src/recommendations.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

Update lib/collection/src/recommendations.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

Update lib/collection/src/recommendations.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

fix comment of plain search

Update lib/collection/src/recommendations.rs

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>

fix tests

* simplify search query function
2023-12-06 17:20:42 +01:00
Arnaud Gourlay
9f260907c5 Fix optimizer change sparse index on disk (#3143)
* Estimate sparse vector dimension for optimizer (#3142)

* Estimate sparse vector dimension for optimizer

* add hack explanation + todo

Fix optimizer change sparse index on disk

fix index to disk

is appendable fix

add index files if necessary

fix test

* fix tests

---------

Co-authored-by: Ivan Pleshkov <pleshkov.ivan@gmail.com>
2023-12-06 17:19:38 +01:00
Arnaud Gourlay
5b7a99ead1 Estimate sparse vector dimension for optimizer (#3142)
* Estimate sparse vector dimension for optimizer

* add hack explanation + todo
2023-12-06 17:19:23 +01:00
Ivan Pleshkov
286caac3a4 Sparse index persistence (#3131)
* sparse index persistence

* fix tests

* remove defaults
2023-12-06 17:18:38 +01:00
Andrey Vasnetsov
6a70108913 build HNSW with quantized data (#3133)
* build HNSW with quantized data

* review fix
2023-12-06 17:18:33 +01:00
Kaan C. Fidan
8f19257f70 Manhattan distance (#3079)
* implemented Manhattan distance

* updated quantization dependency

* fixed negative distances and doc consistency

* fixed neon implementation

* updated quantization dependency

* updated quantization dependency

* removed redundant copy operation

* updated quantization dependency

* Change back to upstream quantization dependency

---------

Co-authored-by: timvisee <tim@visee.me>
2023-12-06 17:17:34 +01:00
Ivan Pleshkov
197adc2cac remove unnecessary validations for queryenum (#3118) 2023-12-06 17:16:30 +01:00
Ivan Pleshkov
3fc1f96564 Sparse index segment and collection config (#2802)
* quantization storage as separate entity

sparse index try to extend segment types

fix build

fix async scorer

codespell

update openapi

update vector index

remove code duplications

more fixes

more fixes

fix build

fix deserialization test

remove transform_into

are you happy clippy

update openapi

update openapi

are you happy clippy

fix build

optional serialize

more defaults

update openapi

fix comments

generic transpose_map_into_named_vector

rename fields in tests

remove obsolete parts

only named sparse config

VectorStruct without unnamed sparse

NamedVectorStruct without unnamed sparse

remove obsolete test

update openapi

mmap index

revert preprocess function

are you happy fmt

update openapi

fix build

fix tests

are you happy fmt

fix for client generation

fix sparse segment creation

fix basic sparse test

fix conflicts

remove obsolete convertion

fix build

config diffs

update openapi

review remarks

update openapi

fix batch upsert

add failing test showing bad ids matching

fix sparse vector insertion

remove on_disk flag

update openapi

revert debug assert

simplify conversions

update openapi

remove on disk storage flag

update openapi

default for vector config

update openapi comment

remove diffs

update openapi

* enable consensus test

* add comment

* update openapi
2023-12-06 17:16:06 +01:00
Ivan Pleshkov
ee7a165d9b Optional sparse full scan threshold (#3116)
* optional sparse full scan threshold

* update openapi

* skip serializing if none

* review remarks
2023-12-06 17:15:57 +01:00
Ivan Pleshkov
684c58fbdc Sparse vector storage rocksdb only (#3112)
* sparse vector storage rocksdb only

* fix build

* spelling fix

* simplify get_cf

* restore deleted flags loading
2023-12-06 17:15:54 +01:00
Ivan Pleshkov
5fa7ffbc26 Sparse vector propagate REST validation (#3111)
* sparse vector propagate validation

* more validations

* add tests

* are you happy clippy

* fix python tests

* fix error name

* error name

* add error message

* review remarks
2023-12-06 17:15:41 +01:00
Arnaud Gourlay
1ec4ae2654 Fix sparse vector search with_vector (#3110) 2023-12-06 17:15:20 +01:00
Ivan Pleshkov
87e4d0f899 sparse vector basic python client tests fixes (#3108) 2023-12-06 17:15:14 +01:00
Arnaud Gourlay
fee67b2f78 Compute actual indexed_vector_count for more consistence in mix scenario (#3107) 2023-12-06 17:15:09 +01:00
Andrey Vasnetsov
df1ff1cb4b Demote column family not found during flush (#3105)
* Demote payload index column family not found error

* clippy + fmt
2023-12-06 17:14:53 +01:00
Andrey Vasnetsov
7524af06d0 Tolerate rocksdb tail wal errors (#3093)
* make rocksdb ignore its internal WAL consistency for tail records, as we have our own WAL

* fmt
2023-12-06 17:13:45 +01:00
Tim Visée
5ebfdb05b3 Default max_values_per_point to zero, add tests (#3039)
* Prevent another division by zero in geo index

* Set default `max_values_per_point` to zero

* Extend empty cardinality test

* Add unit tests for empty index types with cardinality

* Shortcut cardinality estimation, zero if no values per point

* Use const functions for cardinality type

* Remove redundant checked division, we do a rhs zero check above
2023-12-06 17:12:20 +01:00
Tim Visée
7ba8015455 Remove redundant copy from sum iterator (#3085)
* Remove redundant copy from sum iterator

* Remove another redundant copied call
2023-12-06 17:12:10 +01:00
Tim Visée
fa32db2fc2 Simplify RocksDB column operator, restructure to remove just_seeked (#3083) 2023-12-06 17:11:16 +01:00
Arnaud Gourlay
a09a630367 Accept empty sparse vectors (#3057)
* Accept empty sparse vectors

* sparse vector index is responsbile for filtering empty vectors
2023-12-06 17:09:01 +01:00
Ivan Pleshkov
13f15955fc Sparse vectors rest search and upsert (#3051)
* sparse vector sparse search and upsert

are you happy fmt

fix build

update openapi

batch changes

update openapi

named sparse vector

* review remarks

* cowvalue to cowvector
2023-12-06 17:08:37 +01:00
Kerem Celik
ec6fe7e3c2 Increased maximum visited-list pool size to 128 (#2931)
* Increased visited-list pool size to 128

* Set visited-list pool limit to CPU count, clamp between 16 and 128

* Preallocate visited list pool vector with full capacity

---------

Co-authored-by: timvisee <tim@visee.me>
2023-12-06 17:07:32 +01:00
Arnaud Gourlay
05ea913324 Merge scoring and overlap check for sparse vector (#3047) 2023-12-06 17:07:08 +01:00
Arnaud Gourlay
9ab2a7d522 Remove distance from sparse storage (#3040) 2023-12-06 17:06:35 +01:00
Ivan Pleshkov
86153086ec Sparse vectors api preparations (#3038)
* Sparse vectors api preparations

generic transpose

remove features

unnecessary local variable

add snake case

* distance in config function
2023-12-06 17:06:25 +01:00
Arnaud Gourlay
de2f737c45 Delete RocksDB files more aggressively (#3036) 2023-12-06 17:06:13 +01:00
Arnaud Gourlay
73d013da3c Remove sorted constraint on sparse vectors (#3030)
* Remove sorted constraint on sparse vectors

* make sure to sort the query as well
2023-12-06 17:05:04 +01:00
Tim Visée
6534ea9af9 Use stabilized div_ceil from from std (#2770) 2023-12-06 17:04:59 +01:00
Ivan Pleshkov
d5cea5730b integrate sparse vectors into queries (#3028) 2023-12-06 17:04:19 +01:00
Arnaud Gourlay
4f961f5a28 Fix sparse index build benchmark compilation (#3016) 2023-12-06 17:03:35 +01:00
Arnaud Gourlay
28fa2eedf8 Add fallback to plain search for sparse vectors (#2963) 2023-12-06 17:03:21 +01:00