Commit Graph

1046 Commits

Author SHA1 Message Date
Luis Cossío
0e38ab3fe7 Issues: Accept UUID index (#4953) 2024-08-26 18:27:56 -04:00
Tim Visée
cae2cbbc79 Fix point deletions on mmap segment optimization (#4952)
* Don't use ID but current point offset when optimizing dense mmap storage

This change now matches the implementation in all other storage types.

* Remove now obsolete point offsets in update_from point iterator

* Fix test
2024-08-26 20:02:08 +02:00
Luis Cossío
797a0d58f3 fix: Non-blocking payload index building (#4941)
* separate index creation into build and apply

* check version in Segment impl of `build_field_index`

* add wait to issues test

* fix consensus tests
2024-08-23 08:30:45 -04:00
Luis Cossío
a8d3087360 chore: Split segment into multiple modules (#4927)
* split segment into multiple modules

* fix clippy
2024-08-20 17:47:24 -04:00
Luis Cossío
cd8d882dc8 perf: Limit bad performance of filtered faceting (#4903) 2024-08-20 10:12:20 -04:00
Luis Cossío
99f6d99fba Exact facet mode (#4878) 2024-08-19 23:21:17 -04:00
Luis Cossío
045fb7038c Facets in REST (#4848)
* rename to FacetRequestInternal

* add rest endpoint

* fix correctness by fetching the whole list of values

* fix mmap map index variant

Also removes test for sorted output, for now

* add ytt spec

* fix clippy

* use hashmap inside of local shard

* rename operation to `facet`, add access test

* whitelist endpoint

* change api

* make limit optional
2024-08-19 16:03:26 -04:00
Luis Cossío
770d0e5d00 use total_cmp on ordering_after, skip cases where relaxed cmp is Equal (#4911) 2024-08-19 17:09:51 +02:00
Andrey Vasnetsov
6e0086b6c2 make range and lookup params optional (#4905) 2024-08-19 10:52:27 +02:00
Arnaud Gourlay
c8844388d7 Update Validator 0.18 (#4894)
* Update Validator 0.18

* fix new test error message

* clearer geo error message

* fix error message

* fix unit tests

* Put spaces back

---------

Co-authored-by: timvisee <tim@visee.me>
2024-08-15 15:22:51 +02:00
xzfc
761d18e037 Drop DynamicMmapFlags file rotation logic (#4891)
* Drop DynamicMmapFlags file rotation logic

* Always use flags_a.dat

* Touch up
2024-08-15 12:02:38 +00:00
Andrey Vasnetsov
707134b43e Refactor chunked mmaps (#4888)
* remove dependency on segment in chunked mmap

* move chunked utils to memory subcrate
2024-08-15 12:04:39 +02:00
xzfc
0e6f86bdfb InRamChunkedMmap: optimize using madvise (#4881)
* refactor: introduce AdviceSetting for open_read_mmap/open_write_mmap

* perf: use Advice::Normal in a few places

* perf: use MADV_DONTNEED after reading

* perf: use POSIX_FADV_DONTNEED after reading
2024-08-14 13:41:37 +00:00
Andrey Vasnetsov
44130a462e Mmap subcrate refactoring (#4886)
* make mmap_type independent from segment structures

* make bitvec and thiserror workspace dependencies

* move mmap_type into common/memory subcrate

* fmt
2024-08-14 11:04:56 +02:00
dependabot[bot]
ff34ccfb37 build(deps): bump sysinfo from 0.30.13 to 0.31.2 (#4874)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.13 to 0.31.2.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.13...v0.31.2)

---
updated-dependencies:
- dependency-name: sysinfo
  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-08-13 09:56:51 +02:00
xzfc
c5e5be6931 Limit JsonPath::filename() to 33 characters (#4864) 2024-08-12 11:24:46 +00:00
Luis Cossío
fbd88baf41 Fix reco query tests flakiness (#4815)
* relax float comparison

* use simple delta comparison

* do ulps equality without extra crate
2024-08-09 11:20:24 -04:00
Jojii
2cb03610d8 On-disk Uuid hybrid-index (#4825)
* 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>
2024-08-07 19:45:42 +02:00
Andrey Vasnetsov
e77b6332dd Use mmap lock as default vector storage (#4828)
* add force_ram parameter to chuncked mmap vector storage

* enable mlocked mmap vector storage on unix by default

* regen openapi

* add mlock on creation of chunck

* minor unrelated renaming

* rollback changes in LockedChunkedMmap

* fmt

* make AppendableMmapDenseVectorStorage generic of storage type

* make AppendableMmapMultiDenseVectorStorage generic of storage type

* implement initialization of InRamChunkedMmap

* implement MultiDenseAppendableInRam and variations

* enable InRamChunkedMmap for multivectors

* use same CHUNK_SIZE for mmap and regular chuncked vectors

* enable InRamChunkedMmap by default

* fix tests

* rollback usage of InRamChunkedMmap by default

* review changes

* add assertion on chunk_capacity [skip-ci]
2024-08-07 16:34:58 +02:00
Ivan Pleshkov
07c25f00f1 fix mmap field index snapshot (#4847) 2024-08-07 15:40:10 +02:00
dependabot[bot]
f5408d3093 build(deps): bump rstest from 0.21.0 to 0.22.0 (#4837)
Bumps [rstest](https://github.com/la10736/rstest) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: rstest
  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-08-06 09:26:50 +02:00
Arnaud Gourlay
2fcb4c2452 Make scroll cancellable (#4827)
* Make scroll cancellable

* comments and fix

* better comment
2024-08-05 19:05:45 +02:00
xzfc
7bbb7eed36 Integration tests for on-disk payload indices (#4819)
* refactor: let SegmentBuilder::update take unlocked segments

* style: split long lines

* refactor: introduce TestSegments

* test: add tests for mmap indices
2024-08-03 22:00:03 +02:00
xzfc
bc2c89cd85 Integrate map/numeric mmap indices (#4809)
* Extend FieldIndexBuilder with mmap indices

* Introduce PayloadFieldIndex::files()

* Create and delete index dirs

* Update index_selector and index_builder_selector
2024-08-03 21:45:14 +02:00
xzfc
4500b9fba8 Fix mmap payload index building (rebase) (#4818)
* Fix mmap payload index building

* clippy

---------

Co-authored-by: jojii <jojii@gmx.net>
2024-08-03 09:35:21 +00:00
Arnaud Gourlay
ed3867d762 Distance matrix API internals (#4793)
* Distance matrix API internals

* minor code review

* use new Query sample instead of manual samplig + retrieve

* do not crash if the point does not contain the specific vector

* Use iterative approach in the absence of HasVector condition

* add tests
2024-08-02 21:48:25 +02:00
Luis Cossío
ba43d16880 Support timeout in Facets (#4792)
* nits in segments_searcher

* implement timeout into segment faceting

* Add timeout to internal service api

* refactor iterator_ext, and add test
2024-08-02 12:57:20 -04:00
Andrey Vasnetsov
644b01ee89 Refactor resharding filter (#4799) 2024-08-02 13:48:45 +02:00
Ivan Pleshkov
3a610d97f6 Mmap map index (#4779)
* define mmap map index

add point to values

add mmap hash map

are you happy fmt

use new mmap hashmap methods

build index

saturating_sub

are you happy clippy

fix tests build

* integrate facets for mmap index

* mmap tests

* fix ci

* review remarks

* review remarks
2024-08-02 13:01:19 +02:00
Luis Cossío
5a8c79e05e Facets in internal service (#4790)
* add `facet` to shard trait

* Add internal service

* gen grpc docs
2024-08-01 16:03:40 -04:00
Luis Cossío
0a2bb7d483 Facets in local shard (#4785) 2024-08-01 13:09:37 -04:00
Luis Cossío
d4c5b3d0ee More filtering of points without preallocating (#4782) 2024-07-31 14:26:12 -04:00
Jojii
5602b618ce Rename tenant to principal for float,int,datetime (#4789)
* Rename tenant to principal for float,int,datetime

* Apply review proposal
2024-07-31 17:09:52 +02:00
dependabot[bot]
f264c550a3 build(deps): bump charabia from 0.8.12 to 0.9.0 (#4774)
Bumps [charabia](https://github.com/meilisearch/charabia) from 0.8.12 to 0.9.0.
- [Release notes](https://github.com/meilisearch/charabia/releases)
- [Commits](https://github.com/meilisearch/charabia/compare/v0.8.12...v0.9.0)

---
updated-dependencies:
- dependency-name: charabia
  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-31 12:40:52 +02:00
Luis Cossío
ebad154f92 Facets in segment (#4753)
* faceting in segment

* Add segment integration test

* nits

* count from filtered stream, not value->points map directly

* drop AtomicRef from fn signature

* count only unique values per point

* use entry in hashmap

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-07-30 13:18:19 -04:00
Ivan Pleshkov
5c56ce6dcb Mmap numeric index (#4721)
* mmap numeric index

dynamic numeric index

remove pub from fields

add mmap enum

remove vec<u8> as number

get_value without self

mmap save load

trait for conversion from P into T

save-load points-to-values

fix unit tests

are you happy clippy

fix ci

apply changes from #4743

NumericIndex: add new_mmap() method

remove mmapvalue trait from immutable

small refactor

implement from_referenced for str

are you happy clippy

deleted flags by idx instead of pairs

* fix build after rebase

* review remarks

* tests macos

* increase deleted count while deletion
2024-07-30 12:04:14 +02:00
Jojii
7c37213e95 fix tenants not getting applied from API (#4763) 2024-07-29 15:36:33 +02:00
Tim Visée
7c66c5c541 Implement resharding down (#4697)
Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
2024-07-29 13:38:09 +02:00
xzfc
26b0f08455 Tidy up integration tests (#4756) 2024-07-26 21:28:37 +02:00
Jojii
ec0cc86953 Enable new idtracker (#4692)
* enable immutable_id_tracker and in_memory_id_tracker

* remove redundent flush

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-07-26 18:38:35 +02:00
Jojii
17462ef1a7 UUID payload index (#4738)
* 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>
2024-07-26 16:59:34 +02:00
Ivan Pleshkov
8958c0a127 numeric index remove direct db usage (#4757) 2024-07-26 12:33:40 +02:00
xzfc
9e6a83e60a Add {Integer,Float,Datetime}IndexParams::on_disk to the API (#4755)
* Add {Keyword,Integer,Float,Datetime}IndexParams::on_disk to the API

* Add PayloadFieldSchema::is_on_disk()
2024-07-26 10:12:35 +00:00
Luis Cossío
bcad20d71a Use option in filter and estimate_cardinality (#4747)
* chore: filter returns option

* chore: make estimate_cardinality return Option

* better comment
2024-07-25 16:05:12 -04:00
Arnaud Gourlay
2a78b659c3 set RocksDB compression to lz4 (#4723) 2024-07-25 15:04:05 +02:00
Ivan Pleshkov
adec17c724 Dynamic numeric index without persistence (#4745)
* dynamic numeric index without persistence

* review remarks
2024-07-25 00:04:58 +02:00
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