Commit Graph

1780 Commits

Author SHA1 Message Date
xzfc
a860aa714e Introduce MapIndexKey (#4676)
* Introduce MapIndexKey

* Review fixes

* Remove unnecessary .borrow() call
2024-07-16 13:36:50 +00:00
dependabot[bot]
8aa79ada0a build(deps): bump cc from 1.0.106 to 1.1.5 (#4671)
Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.0.106 to 1.1.5.
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.0.106...cc-v1.1.5)

---
updated-dependencies:
- dependency-name: cc
  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-07-16 14:21:32 +02:00
dependabot[bot]
eb8d82bacb build(deps): bump charabia from 0.8.11 to 0.8.12 (#4668)
Bumps [charabia](https://github.com/meilisearch/charabia) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/meilisearch/charabia/releases)
- [Commits](https://github.com/meilisearch/charabia/compare/v0.8.11...v0.8.12)

---
updated-dependencies:
- dependency-name: charabia
  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-07-15 20:24:11 +00:00
Ivan Pleshkov
e29ab935db Remove dyn iterator from field condition checker (#4665)
* remove dyn iterator from field condition checker

* are you happy clippy

* review remarks
2024-07-15 17:08:16 +02:00
Andrey Vasnetsov
eb7a2fe223 Fix full payload update (#4663)
* refactor assign_all payload to avoid double change of payload storage

* fmt

* implement assign_all for payload sotrage
2024-07-15 10:19:31 +02:00
Luis Cossío
27e28cd393 universal-query: Distribution-Based Score Fusion (#4614)
* refactor fusion into method

* expose distribution-based score fusion

* gen openapi and docs

* Better rest description

* add basic integration test
2024-07-12 08:11:59 -04:00
xzfc
0a8728a323 Introduce iterator for DatabaseColumnScheduledDeleteWrapper (#4662)
* Revert "Add RocksDB column operator filtering pending deletes"

This reverts commit dc074ee7ff.

* Restore Arc after reverting

* Introduce iterator for DatabaseColumnScheduledDeleteWrapper
2024-07-12 13:11:51 +02:00
Kartik Gupta
043dcf4916 Fix examples for scored point (#4659)
* Revert "Merge pull request #4560"

This reverts commit 5b0536df39.

* point id examples

* payload example

* VectorStruct example

* fmt

* ShardKey example

* OrderValue example

* fix

* example for SeqNumberType, ScoreType
2024-07-12 12:55:35 +02:00
Tim Visée
988e3129a7 Fix NaN score for zeroed uint8 vectors (#4661)
* Fix division by zero in SSE2, AVX and NEON implementations of u8 cosine

* Add zero division tests

* Fix incorrect test name

* Also test inverse, and add naive implementation test

* Use correct function in NEON test

* Fix NEON feature check

* Store denominator
2024-07-12 12:28:45 +02:00
Ivan Pleshkov
da56932259 Field index values as iterator instead of slice (#4644)
* field index values as iterator instead of slice

* Use consistent assertions

* fix wrong values_count update

---------

Co-authored-by: timvisee <tim@visee.me>
2024-07-12 11:37:20 +02:00
Andrey Vasnetsov
4cf1f063a5 Ensure payload is deleted on flush only (#4653)
* Use DatabaseColumnScheduledDeleteWrapper to make sure we only delete payload and indexed payload when flushed at the right time

* Remove double clone

* In on disk payload storage, don't return payload if delete is pending

* hide deleted_pending_persistence inside the abstraction

* Add RocksDB column operator filtering pending deletes

---------

Co-authored-by: timvisee <tim@visee.me>
2024-07-11 14:48:11 +02:00
xzfc
69b63baa07 Drop JsonPathString (#4621)
* drop some code

* Drop JsonPathString

* Fix test_remove_key

Drop failing tests:
- Deleting array indices is not idempotent, so we don't support it.
- Empty JSONPath is not supported.

* Make json_path::path() non-generic

* Remove references to JsonPathV2

* Drop JsonPathInterface

* Move json_path::v2 code into json_path

* Drop validate_not_empty

* Drop JsonPath::head() as being unused

* Replace path() with JsonPath::new()

* Restore comments

* Move tests to json_path

* Use json() consistently in tests

* Replace many into calls with Into trait

---------

Co-authored-by: timvisee <tim@visee.me>
2024-07-11 04:06:40 +00:00
Arnaud Gourlay
d5fc02149e remove unused dependencies (#4645) 2024-07-10 09:34:21 +02:00
Arnaud Gourlay
bb9f9f8e94 universal-query: Grouping REST API (#4616)
* universal-query: Grouping REST API

* add API docs

* bump API count

* add jwt validation test

* fix API

* better test

* stay on CoreSearchRequest where possible

* use existing scoring helper

* push broken test to illustrate issue

* track best score per point_id to enable sort on payload

* add example test for query discover with groups

* track ScoredPoint instead of PointId

* add default values for smoother ux
2024-07-10 08:26:57 +02:00
Andrey Vasnetsov
fc3ffc2c2d Merge pull request #4560
* schemars example for vectors in scored point

* schemars example for payload in scored point

* Using json! in schemars example for payload in scored point

* fix

* schemars example for shard_key in scored point

* schemars example for order_by in scored point

* schemars example for id, version, score in scored point

* schemars example for id, payload, vector, shard_key, order_value  in …

* point id examples

* remove id_example in schema.rs

* schemars example for vector, named_sparse_vector, named_vector

* schemars example for order_by

* schemars example for OrderByInterface

* schemars example for Fusion

* schemars example for MultiDenseVector,DenseVector in VectorInput

* schemars example for QueryRequest

* schemars example for QueryRequestBatch

* schemars example for QueryResponse

* schemars example for FusionQuery, OrderByQuery, ContextQuery, Discove…

* example for WithLookup, ContextPair, ContextInput, DiscoverInput, Rec…

* fix
2024-07-09 14:42:43 +02:00
Roman Titov
2e4503918a Derive/implement fmt::Debug for Segment (#4632) 2024-07-09 14:19:42 +02:00
dependabot[bot]
8ab46cac22 build(deps): bump tinyvec from 1.6.1 to 1.8.0 (#4638)
Bumps [tinyvec](https://github.com/Lokathor/tinyvec) from 1.6.1 to 1.8.0.
- [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lokathor/tinyvec/compare/v1.6.1...v1.8.0)

---
updated-dependencies:
- dependency-name: tinyvec
  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-07-09 09:49:05 +02:00
xzfc
90ce6cbd01 Add MmapHashMap (#4612)
* Promote some deps to workspace deps

* Add MmapHashMap

* Review fixups

* Use tempfile for atomicity
2024-07-08 17:44:52 +00:00
Luis Cossío
6f4429f8e1 Fusions: add score fusion internals (#4601)
* add score fusion internals

* clippy lints

* address @agourlay's comments

* also use negatives in test
2024-07-08 11:08:57 -04:00
Roman Titov
e251cb84fd Merge pull request #4620
* Add `force` flag to `SegmentEntry::flush` and `ShardHolder::flush_all…
2024-07-08 15:58:19 +02:00
xzfc
9daf5799d2 Remove dead code (#4623) 2024-07-08 09:51:59 +02:00
xzfc
198e760c8a Use stabilized Bound::map (#4624)
* Use stabilized Bound::map

* Remove outdated comment
2024-07-06 14:00:28 +00:00
xzfc
7b8ac92208 Extend PayloadSchemaParams to every PayloadSchemaType (#4613)
* Move IntegerIndexType and TextIndexType into a common file

* Formatting

* Extend PayloadSchemaParams to every PayloadSchemaType
2024-07-05 12:09:31 +00:00
Arnaud Gourlay
658a0beced Promote Rand dependency to workspace (#4606) 2024-07-03 13:11:11 +02:00
Arnaud Gourlay
e1b2af1a86 Promote log dep to workspace (#4605) 2024-07-03 12:35:04 +02:00
Arnaud Gourlay
ece9fe57bc charabia 0.8.11 (#4604) 2024-07-03 10:58:06 +02:00
dependabot[bot]
914e842929 build(deps): bump tinyvec from 1.6.0 to 1.6.1 (#4590)
Bumps [tinyvec](https://github.com/Lokathor/tinyvec) from 1.6.0 to 1.6.1.
- [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lokathor/tinyvec/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: tinyvec
  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-07-02 11:51:31 +02:00
Arnaud Gourlay
ba522730f8 Fix DynamicMmapFlag counting by not using get proxy (#4589)
* Fix DynamicMmapFlag counting by not using get proxy

* Just count ones in the bitslice of our configured size

---------

Co-authored-by: timvisee <tim@visee.me>
2024-07-02 11:48:20 +02:00
Arnaud Gourlay
1b8ba4ddb0 Remove unused struct VectorIndexesTelemetry (#4587) 2024-07-01 11:46:27 +02:00
tellet-q
c88f10c19f Add test for OOD during indexing (#4267)
* Add test for OOD during indexing

* Start indexing right after 1st OOD message

* Only send search request after insert loop

* Fail early when encountering out-of-storage during optimization (#4578)

* fs4@0.8.4

* fail early on low storage

* move `dir_size` to `common`

* move the ood bailout to `SegmentOptimizer::optimized_segment_builder`

* drop dead code

* move dir_size to common subcrate

---------

Co-authored-by: generall <andrey@vasnetsov.com>

---------

Co-authored-by: xhjkl <xhjkl@users.noreply.github.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-29 22:40:18 +02:00
Luis Cossío
eff245d840 order_by: Order by value, then id. Dedup by both (#4580)
* order by value, then id. Dedup by both

* order values properly, but dedup by id only

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-29 22:38:02 +02:00
xzfc
58a15c985f Set USE_COMPRESSED to true (#4575)
* Set USE_COMPRESSED to true

* Switch to using compressed posting lists in tests
2024-06-27 14:09:02 +00:00
Tim Visée
c4a6b2495d When opening a snapshot file, mask its contents on error (#4571)
* When opening a snapshot file, mask its contents on error

Before, it simply dumped part of the file contents back to API users.
This allowed reading arbitrary files.

* Remove intermediate step for reading entry type
2024-06-27 12:39:14 +02:00
Ivan Pleshkov
5584ed0435 Fix colberts TODOs (#4566)
* Fix colberts TODOs

* are you happy clippy
2024-06-27 10:50:02 +02:00
Tim Visée
daf8942300 Include HNSW config file in snapshots (#4556) 2024-06-25 13:44:17 +02:00
Tim Visée
78f7c63f82 Remove version check in sparse vector mmap index migration (#4555)
This check prevented converting from 1.9.3 or 1.9.4 into newer versions
2024-06-25 13:15:57 +02:00
dependabot[bot]
2b5d4bd256 build(deps): bump proptest from 1.4.0 to 1.5.0 (#4548)
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: proptest
  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-06-25 09:43:52 +02:00
xzfc
b9c0bd0f7d Drop SparseVectorIndexDatatype in favor of VectorStorageDatatype (#4541)
* Drop SparseVectorIndexDatatype in favour of VectorStorageDatatype

* Split Datatype doc for VectorParams and SparseIndexParams
2024-06-24 19:27:34 +02:00
xzfc
dd3102baeb U8 quantization for sparse vector index (#4514)
* U8 quantization for sparse index

* Spelling
2024-06-24 14:12:29 +00:00
xzfc
cde39fb8a2 Move build_index out of VectorIndex (#4490)
* Move build_index out of VectorIndex

* Build index in HNSWIndex::open()

* Introduce HnswIndexOpenArgs

* Proper deletion

* Improve tests

* HNSW::open(): add warn, comment and assert

* Revert to making up the config if it does not exist
2024-06-24 14:44:34 +02:00
Andrey Vasnetsov
d4807dcc8b Api consistency update (#4533)
* rename search_params -> params

* rename multivector_config + generate schema

* upd tests
2024-06-23 23:56:42 +02:00
Tim Visée
da6a856498 Fix new appendable segments not having payload indices (#4523)
* Propagate payload index schema down to shard replica set + update handler

* Configure payload indices when creating new appendable segment

* When loading segments, make sure applied payload indices match config

* Add test to assert creating new segments with payload index

* Fix unit test because the collection payload schema wasn't updated

* Add test for updating payload index configuration on segment load

* Update test documentation

* Also create payload indices in temporary snapshot segment

* do not delete extra payload index from segments

* do not delete extra payload index from segments

* fix test

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-21 20:01:05 +02:00
Roman Titov
d4b32012eb Rework CommitHashRing consensus message into CommitRead/CommitWrite/Finish (#4417)
* Refactor `CommitHashRing` into `CommitRead`/`CommitWrite`/`Finish`

* Add `Resharding` filter condition

* Filter "resharded" points from search, scroll by, count and retrieve request results

* fixup! Refactor `CommitHashRing` into `CommitRead`/`CommitWrite`/`Finish`

`cargo clippy --fix`

* Apply suggestions from code review

* fixup! Filter "resharded" points from search, scroll by, count and retrieve request results

Add `Condition::is_local_only` method

* fixup! Add `Resharding` filter condition

* fixup! Filter "resharded" points from search, scroll by, count and retrieve request results

Clarified a few `TODO`s

* Fix clippy suggestions

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: timvisee <tim@visee.me>
2024-06-19 12:14:26 +02:00
Andrey Vasnetsov
1878713679 Fix multivector for unnamed vectors (#4482)
* minor conversion improvement

* use NamedVectors in update_vectors

* remove merge from VectorStruct

* rename Multi -> Named in vector struct

* add multi-dense vectors option into VectorStruct

* generate openapi

* rename VectorStruct -> VectorStructInternal

* add conversion for anonymous multivec in grpc

* renames for BatchVectorStruct

* implement multi-dense for batch

* allow multi-dense in batch upserts

* test and fixes
2024-06-18 20:38:24 +02:00
xzfc
53e883ea48 Add datatype option for sparse vector index (#4454)
* Add SparseVectorIndexDatatype

* Update tests

* Review fixes

* review

* gen openAPI

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-06-18 13:32:06 +00:00
Ivan Pleshkov
3ed43b50e8 fix building cancellation flaky test (#4477) 2024-06-18 10:14:36 +02:00
Ivan Pleshkov
3d7647f89b Max size of multivector to fix chunk in storage (#4478)
* Max size of multivector to fix chunk in storage

* Update lib/common/common/src/validation.rs

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-06-17 17:14:18 +02:00
xzfc
05ff867ff3 Integrate compressed posting list (attempt 2) (#4453)
* Rename InvertedIndex* -> InvertedIndexCompressed*

* Extract method VectorIndexEnum::fill_idf_statistics

* Extend VectorIndexEnum with new variants

* Introduce sparse::InvertedIndex::Version

* Replace SparseVectorIndexVersion -> InvertedIndex::Version

* Introduce sparse_vector_index::OpenArgs

* SparseVectorIndex::open: do not build index if directory is empty

Otherwise it would build the index twice since `SegmentBuilder::build()`
calls `::open()`, then `::build_index()`. This restores the old (<=v1.9)
behavior.

* Renames
2024-06-17 14:41:38 +02:00
Ivan Pleshkov
4779f5e88e fix docker arm f16 build (#4466) 2024-06-13 21:16:29 +02:00
Luis Cossío
26f857a323 allow missing_safety_doc and dead_code (#4468) 2024-06-13 20:45:07 +02:00