Commit Graph

1000 Commits

Author SHA1 Message Date
Ivan Pleshkov
a1059a1a05 remove vec u8 from mutable numeric index (#4744) 2024-07-24 15:53:14 +02:00
Ivan Pleshkov
1c7d1eb329 Remove NumericIndexKey and use histogram point (#4743)
* Remove NumericIndexKey and use histogram point

* use old ordering

* fix ci
2024-07-24 14:09:39 +02:00
Ivan Pleshkov
809fbd654e use filed index builder in numeric index tests (#4742) 2024-07-24 13:24:37 +02:00
Ivan Pleshkov
1cfcf860ff ValueIndexer get_value without self (#4740) 2024-07-24 08:43:00 +02:00
xzfc
7d7d6df50a Drop FieldIndex::recreate() method (#4735)
* Drop FieldIndex::recreate() method

* Make `make_empty()` return `Result`
2024-07-23 13:53:08 +00:00
Jojii
7432ece2f9 remove testing non-defragmented segments for non-defragmentation (#4734) 2024-07-23 10:47:13 +02:00
Luis Cossío
f20d0dc4e2 fix new pedantic lints on mac target_os (#4732) 2024-07-22 16:22:53 -04:00
Arnaud Gourlay
632e59f061 Fix Charabia Chinese tokenization (#4722) 2024-07-22 16:28:31 +02:00
xzfc
feb5b6385e Introduce FieldIndexBuilder (#4717) 2024-07-22 10:19:23 +00:00
Ivan Pleshkov
bcfb51fb40 Mmap points to values map (#4641)
* definitions

* create file

* ranges

* get values

* are you happy clippy

* remove unnecessary function

* are you happy codespell

* review fixes

* are you happy clippy

* fmt

* add padding

* update map public functions as in the dev

* are you happy clippy

* review remarks

* generic structure

* review remarks

* review fixes
2024-07-22 10:26:12 +02:00
xzfc
a0ea3caccf Enable some of the pedantic clippy lints (#4715)
* Use workspace lints

* Enable lint: manual_let_else

* Enable lint: enum_glob_use

* Enable lint: filter_map_next

* Enable lint: ref_as_ptr

* Enable lint: ref_option_ref

* Enable lint: manual_is_variant_and

* Enable lint: flat_map_option

* Enable lint: inefficient_to_string

* Enable lint: implicit_clone

* Enable lint: inconsistent_struct_constructor

* Enable lint: unnecessary_wraps

* Enable lint: needless_continue

* Enable lint: unused_self

* Enable lint: from_iter_instead_of_collect

* Enable lint: uninlined_format_args

* Enable lint: doc_link_with_quotes

* Enable lint: needless_raw_string_hashes

* Enable lint: used_underscore_binding

* Enable lint: ptr_as_ptr

* Enable lint: explicit_into_iter_loop

* Enable lint: cast_lossless
2024-07-22 08:19:19 +00:00
Jojii
7dfbe1e939 In memory IdTracker (#4658)
* add in_memory_id_tracker

* add ImmutableIdTracker to IdTrackerEnum

* improve in in_memory_id_tracker

* Add benchmark and revert changes

* fix not compiling

* rebase to dev

* Minor ImmutableIdTracker improvements (#4698)

* remove unnecessary allocation + add minor improvements

* fix import

* refactor points_mapping to share function between immutable & in_memory id trackers

* test and fix for version persistence;

* fmt

* fix tests

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-07-19 21:58:32 +02:00
Ivan Pleshkov
8c50dc8e45 fix build after merge numeric field index internal type (#4711) 2024-07-19 16:19:09 +02:00
xzfc
a92c84949e Make ValueIndexer trait non-generic (#4690)
* Introduce NumericIndexInner

* Make ValueIndexer trait non-generic
2024-07-19 12:57:25 +00:00
Ivan Pleshkov
6c13a0826d Histogram save load (#4537)
* histogram save load

* add separate save-load test

* are you happy clippy

* review remarks
2024-07-19 14:55:39 +02:00
Luis Cossío
2c8772d379 implement iter_random for immutable_id_tracker (#4700) 2024-07-18 15:45:11 -04:00
Luis Cossío
5b65cdd9ab random-query: Implement random reads from segments up to local shard (#4619)
* Implement random reads from segments up to local shard

* fix some review comments

- unimplemented for fixture implementation
- map after chaining
- kmerge instead of choose_multiple

* add custom filtered_read_by_index_shuffled

* cargo clippy

* grab from each segment depending on availability

* sample in O(limit) (#4680)

* edit comment

---------

Co-authored-by: Andrey Vasnetsov <andrey@vasnetsov.com>
2024-07-18 14:07:31 -04:00
Jojii
68373fb600 Basic defragmentation (#4610)
* 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>
2024-07-18 11:43:56 +02:00
Jojii
760180ff32 Merge pull request #4403
* add immutable_id_tracker

* add dirty flag in test

* don't use immutable_id_tracker for now

* improve and integrate new immutable_id_tracker

* split external_to_internal into two BTreeMaps

* apply rquested changes

* delay mmap writes until flush

* remove unnecessary clone

* single source of truth for file path

* use custom de/serialization for more performance

* disable id tracker and fix codespell

* improve code & test

* Other minor nitpicks

* Apply suggestions from code review

* fix rebase issues

* basic custom mappings storage implementation

* add tests & fix bugs

* add more tests and fix bugs

* undo .codespellrc

* disable immutable_id_tracker completely for now

* fix clippy

* Remove unnecessary pub

* minor renaming
2024-07-17 19:45:22 +02:00
xzfc
1103c0bde0 Add JsonPath::filename() (#4677)
* promote sha2 to workspace

* Add JsonPath::filename()

* Add TODO comment
2024-07-17 12:40:14 +00:00
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