Commit Graph

1780 Commits

Author SHA1 Message Date
Luis Cossío
6b7fa54cf8 Fix clippy 1.77 lints: explicitly set truncate flag on file creation (#3561)
* add `truncate(true)` where unspecified

* remove unused `WriteGuard` wrapper

* Don't truncate if we explicitly set the size later

---------

Co-authored-by: timvisee <tim@visee.me>
2024-02-08 11:24:47 +01:00
Luis Cossío
e89acde077 Order-by: Introduce OrderingValue for ordering also based on int values (#3533)
* introduce `OrderingValue` for ordering also based on int values

* use `num-cmp` for comparing ints and floats

* Update comparison logic

---------

Co-authored-by: Albert Safin <xzfcpw@gmail.com>
2024-02-07 09:54:40 -03:00
Arnaud Gourlay
e7c7e715cb Apply RocksDB options to all column families (#3557)
* Apply RocksDB options to all column families

* clean
2024-02-07 13:29:40 +01:00
dependabot[bot]
9c85c02d85 bump io-uring from 0.6.2 to 0.6.3 (#3539)
---
updated-dependencies:
- dependency-name: io-uring
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 09:45:42 +01:00
Luis Cossío
85d432b342 Datetime index: Introduce RangeInterface (#3516)
* merge range and datetime range into one interface

* remove separate datetime_range from FieldCondition

* review fixes, remove code duplication. Thanks @xzfc

* update openapi test
2024-02-05 15:09:05 -03:00
Tim Visée
56171c6087 Dynamic CPU saturation integration (#3115)
* Integrate dynamic CPU saturation with public API changes

This reverts commit 08930fefa9.

* Call num_cpus only once
2024-02-05 14:08:02 +01:00
Luis Cossío
b0aab16b0d order_by in scroll (#3493)
* first PR implementation (#2865)

- fetch offset id
- restructure tests
- only let order_by with numeric
- introduce order_by interface

cargo fmt

update openapi

calculate range to fetch using offset + limit, do some cleanup

enable index validation, fix test

Fix pagination

add e2e tests

make test a little more strict

select numeric index on read_ordered_filtered

add filtering test 🫨

fix filtering on order-by

fix pip requirements

add grpc interface, make read_ordered_filtered fallible

fmt

small optimization of `with_payload` and `with_vector`

refactor common logic of point_ops and local_shard_operations

Make filtering test harder and fix limit for worst case

update openapi

small clarity refactor

avoid extra allocation when sorting with offset

stream from numeric index btree instead of calculating range

use payload to store order-by value, instead of modifying Record interface

various fixes:
- fix ordering at collection level, when merging shard results
- fix offset at segment level, to take into account also value offset
- make rust tests pass

remove unused histogram changes

fix error messages and make has_range_index exhaustive

remove unused From impl

Move OrderBy and Direction to segment::data_types::order_by

Refactor normal scroll_by in local_shard_operations.rs

More cleanup + rename OrderableRead to StreamWithValue

empty commit

optimization for merging results from shards and segments

fix case of multi-valued fields

fix IntegerIndexParams name after rebase

precompute offset key

use extracted `read_by_id_stream`

Expose value_offset to user
- rename offset -> value_offset
- extract offset value fetching logic

* remove offset functionality when using order_by

* include order_by in ForwardProxyShard

* extra nits

* remove histogram changes

* more nits

* self review

* resolve conflicts after rebase, not enable order-by with datetime index schema

* make grpc start_from value extendable

* gen grpc docs

---------

Co-authored-by: kwkr <kawka.maciej.93@gmail.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-02-04 18:46:22 +01:00
Ivan Pleshkov
5d4ce6e47d filed index point to values as separate struct (#3297)
numeric index

immutable geo index

are you happy clippy

use ImmutablePointToValues in geo index

flatten point and values

is_appendable flag

flatten points_map

unit tests

fix unit tests

are you happy fmt

more tests
2024-02-02 14:12:02 +01:00
Roman Titov
b8627c5e8e Add clock_tag field to update operations (#3408) 2024-02-01 11:44:13 +01:00
Tim Visée
0301e39943 Dynamic CPU saturation internals (#3364)
* Move CPU count function to common, fix wrong CPU count in visited list

* Change default number of rayon threads to 8

* Use CPU budget and CPU permits for optimizer tasks to limit utilization

* Respect configured thread limits, use new sane defaults in config

* Fix spelling issues

* Fix test compilation error

* Improve breaking if there is no CPU budget

* Block optimizations until CPU budget, fix potentially getting stuck

Our optimization worker now blocks until CPU budget is available to
perform the task.

Fix potential issue where optimization worker could get stuck. This
would happen if no optimization task is started because there's no
available CPU budget. This ensures the worker is woken up again to
retry.

* Utilize n-1 CPUs with optimization tasks

* Better handle situations where CPU budget is drained

* Dynamically scale rayon CPU count based on CPU size

* Fix incorrect default for max_indexing_threads conversion

* Respect max_indexing_threads for collection

* Make max_indexing_threads optional, use none to set no limit

* Update property documentation and comments

* Property max_optimization_threads is per shard, not per collection

* If we reached shard optimization limit, skip further checks

* Add remaining TODOs

* Fix spelling mistake

* Align gRPC comment blocks

* Fix compilation errors since last rebase

* Make tests aware of CPU budget

* Use new CPU budget calculation function everywhere

* Make CPU budget configurable in settings, move static budget to common

* Do not use static CPU budget, instance it and pass it through

* Update CPU budget description

* Move heuristic into defaults

* Fix spelling issues

* Move cpu_budget property to a better place

* Move some things around

* Minor review improvements

* Use range match statement for CPU count heuristics

* Systems with 1 or 2 CPUs do not keep cores unallocated by default

* Fix compilation errors since last rebase

* Update lib/segment/src/types.rs

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

* Update lib/storage/src/content_manager/toc/transfer.rs

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

* Rename cpu_budget to optimizer_cpu_budget

* Update OpenAPI specification

* Require at least half of the desired CPUs for optimizers

This prevents running optimizations with just one CPU, which could be
very slow.

* Don't use wildcard in CPU heuristic match statements

* Rename cpu_budget setting to optimizer_cpu_budget

* Update CPU budget comments

* Spell acquire correctly

* Change if-else into match

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

* Rename max_rayon_threads to num_rayon_threads, add explanation

* Explain limit in update handler

* Remove numbers for automatic selection of indexing threads

* Inline max_workers variable

* Remove CPU budget from ShardTransferConsensus trait, it is in collection

* small allow(dead_code) => cfg(test)

* Remove now obsolete lazy_static

* Fix incorrect CPU calculation in CPU saturation test

* Make waiting for CPU budget async, don't block current thread

* Prevent deadlock on optimizer signal channel

Do not block the optimization worker task anymore to wait for CPU budget
to be available. That prevents our optimizer signal channel from being
drained, blocking incoming updates because the cannot send another
optimizer signal. Now, prevent blocking this task all together and
retrigger the optimizers separately when CPU budget is available again.

* Fix incorrect CPU calculation in optimization cancel test

* Rename CPU budget wait function to notify

* Detach API changes from CPU saturation internals

This allows us to merge into a patch version of Qdrant. We can
reintroduce the API changes in the upcoming minor release to make all of
it fully functional.

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-01-31 11:56:34 +01:00
xzfc
41784a29bf DateTime payload index (#3395)
* Datetime payload index

* Introduce IndexMapItem

* Drop FieldIndex::DatetimeIndex

* Rename OpenAPI struct names

* Switch to microseconds

* Validate and serialize grpc timestamps

* Add tests with different timezones

* minor review fixes

* Revert "Drop FieldIndex::DatetimeIndex"

This reverts commit d55f251afd.

* Revert "Introduce IndexMapItem"

This reverts commit c5255f6b1a.

* fix: back to microseconds after reverts

* extract range conversion from boxed checker fn

* add log to deps

* don't run macro doctest

* no_run -> ignore

* remove prost-types in favor of prost-wkt-types

* better assertion on test_payload_indexing.py

* propagate unparsable datetime

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
2024-01-31 11:14:31 +01:00
Tim Visée
0f7c1c39d6 Demote thread priority setting warning to debug message (#3494) 2024-01-31 10:12:26 +01:00
Tim Visée
06712e8f4d Move common dependencies to workspace (#3490) 2024-01-31 09:01:38 +01:00
Luis Cossío
66f0d373aa Fix potential context search edge case (#3374)
* constrain loss to [0, -1)

* fmt

* update 2-d model link
2024-01-30 17:52:27 -03:00
dependabot[bot]
8217a4f819 Bump chrono from 0.4.31 to 0.4.33 (#3483)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.31 to 0.4.33.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.31...v0.4.33)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 10:06:50 +01:00
dependabot[bot]
8e5587c390 Bump memmap2 from 0.9.3 to 0.9.4 (#3484)
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.9.3 to 0.9.4.
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.3...v0.9.4)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-30 09:42:42 +01:00
Arnaud Gourlay
f510fb151f Remove doctest usage (#3475) 2024-01-29 10:21:10 +01:00
Ivan Pleshkov
f2f4513aec Filed index point-to-values as separate struct (#3296)
* filed index point to values as separate struct

* numeric index

* return removed values

* add comments

* codespell

* add unit test

* fix counters

* review remarks
2024-01-25 17:56:16 +01:00
dependabot[bot]
0ac0e5b480 Bump uuid from 1.6.1 to 1.7.0 (#3441)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.6.1...1.7.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 10:12:27 +01:00
dependabot[bot]
2eaadad0d4 Bump smol_str from 0.2.0 to 0.2.1 (#3440)
Bumps [smol_str](https://github.com/rust-analyzer/smol_str) from 0.2.0 to 0.2.1.
- [Commits](https://github.com/rust-analyzer/smol_str/commits)

---
updated-dependencies:
- dependency-name: smol_str
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 09:29:48 +01:00
dependabot[bot]
2a08fb38d0 Bump rayon from 1.8.0 to 1.8.1 (#3437)
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.0 to 1.8.1.
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1)

---
updated-dependencies:
- dependency-name: rayon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 09:28:13 +01:00
Arnaud Gourlay
a20bb6ce5a Remove unused dependencies (#3435) 2024-01-22 15:36:38 +01:00
dependabot[bot]
8c3533e5e5 Bump semver from 1.0.20 to 1.0.21 (#3399)
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.20 to 1.0.21.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.20...1.0.21)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 10:40:13 +01:00
dependabot[bot]
49ccaae598 Bump atomicwrites from 0.4.2 to 0.4.3 (#3396)
Bumps [atomicwrites](https://github.com/untitaker/rust-atomicwrites) from 0.4.2 to 0.4.3.
- [Commits](https://github.com/untitaker/rust-atomicwrites/compare/0.4.2...0.4.3)

---
updated-dependencies:
- dependency-name: atomicwrites
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-16 10:39:07 +01:00
Tim Visée
bb5e3b9e10 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-01-15 10:08:06 +01:00
Tim Visée
cf8d13cf6c Rename IntegerParams to IntegerIndexParams to be consistent with text (#3385) 2024-01-12 16:16:22 +01:00
Tim Visée
e42f35b623 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-01-11 18:41:14 +00:00
Arnaud Gourlay
511ffbc75a Handle empty sparse vector search (#3368) 2024-01-10 11:28:53 +01:00
dependabot[bot]
4b08e7310e Bump tempfile from 3.8.1 to 3.9.0 (#3353)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.8.1 to 3.9.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.8.1...v3.9.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 12:17:26 +01:00
Tim Visée
1dd7ee7169 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-01-04 17:52:22 +01:00
Tim Visée
a54d86df54 Bump sysinfo to 0.30.3 (#3310)
* Bump sysinfo to 0.30.3

* Remove redundant refresh, new_with_specifics already refreshes
2024-01-04 12:22:47 +01:00
dependabot[bot]
fda3f87d7c Bump futures from 0.3.29 to 0.3.30 (#3284)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.29 to 0.3.30.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.29...0.3.30)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 12:45:03 +01:00
dependabot[bot]
c1210186b0 Bump memmap2 from 0.9.2 to 0.9.3 (#3283)
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.9.2 to 0.9.3.
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.2...v0.9.3)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 11:36:14 +01:00
Arnaud Gourlay
2cd426dccf Fix clippy 1.75 (#3270) 2023-12-25 13:26:21 +00:00
dependabot[bot]
8f35816dba Bump num-traits from 0.2.16 to 0.2.17 (#3246)
Bumps [num-traits](https://github.com/rust-num/num-traits) from 0.2.16 to 0.2.17.
- [Changelog](https://github.com/rust-num/num-traits/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-traits/compare/num-traits-0.2.16...num-traits-0.2.17)

---
updated-dependencies:
- dependency-name: num-traits
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 10:03:00 +01:00
dependabot[bot]
71fb667c93 Bump ordered-float from 4.1.1 to 4.2.0 (#3242)
Bumps [ordered-float](https://github.com/reem/rust-ordered-float) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v4.1.1...v4.2.0)

---
updated-dependencies:
- dependency-name: ordered-float
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 20:08:01 +01:00
Andrey Vasnetsov
8d9f5605fa 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 18:10:19 +01:00
dependabot[bot]
f1de3b9586 Bump memmap2 from 0.9.0 to 0.9.2 (#3239)
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.9.0 to 0.9.2.
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.9.0...v0.9.2)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 16:00:45 +00:00
Ivan Pleshkov
84f9011537 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-16 00:02:01 +00:00
Ivan Pleshkov
4f0211af5e 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-15 13:00:28 +00:00
Arnaud Gourlay
10e986bf98 Rename SimpleDenseVectorStorage (#3223) 2023-12-13 17:08:37 +00:00
Ivan Pleshkov
da587f98a5 Rename VectorType to DenseVector (#3192)
* rename vectortype to densevector

* rename enums

* are you happy fmt

* openapi

* revert type renamings
2023-12-13 16:20:23 +00:00
dependabot[bot]
1cb8ccbf99 Bump semver from 1.0.18 to 1.0.20 (#3207)
Bumps [semver](https://github.com/dtolnay/semver) from 1.0.18 to 1.0.20.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](https://github.com/dtolnay/semver/compare/1.0.18...1.0.20)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 11:37:10 +00:00
dependabot[bot]
d328902c4d Bump futures from 0.3.28 to 0.3.29 (#3204)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.28 to 0.3.29.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.28...0.3.29)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 11:36:23 +00:00
dependabot[bot]
33a961c1f1 Bump geo from 0.26.0 to 0.27.0 (#3202)
Bumps [geo](https://github.com/georust/geo) from 0.26.0 to 0.27.0.
- [Changelog](https://github.com/georust/geo/blob/main/CHANGES.md)
- [Commits](https://github.com/georust/geo/compare/geo-0.26.0...geo-0.27.0)

---
updated-dependencies:
- dependency-name: geo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 11:35:44 +00:00
Arnaud Gourlay
bb95e86949 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 14:47:53 +01:00
Arnaud Gourlay
16eab22100 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 18:40:24 +01:00
Ivan Pleshkov
c054773296 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 17:36:08 +01:00
Arnaud Gourlay
70274a9a70 Minor API documentation fixes (#3173)
* Minor API documentation fixes

* sync
2023-12-06 15:08:44 +01:00
Ivan Pleshkov
83e2e167e8 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 13:28:17 +01:00