Commit Graph

1780 Commits

Author SHA1 Message Date
Arnaud Gourlay
89336e628d Fix set payload by key on non appendable segment (#5113) 2024-09-23 11:59:08 +02:00
Arnaud Gourlay
7fe546b3cd Configure properly column families when using open_db_with_existing_cf (#5105) 2024-09-19 10:36:21 +02:00
misssonder
567314e732 use point mappings in simple id tracker (#5097)
* use point mappings in simple id tracker

* fix clippy warning
2024-09-17 17:06:30 +02:00
Ivan Pleshkov
f27b6909bd Move quantization repo (#5096)
* move quantization repo

* are you happy fmt

* are you happy clippy

* remove dumping pq to image

* workspace deps

* are you happy clippy
2024-09-17 16:30:26 +02:00
Luis Cossío
025f4e3066 Expose on_disk text index (#5074)
* map index: fix reachable code marked as unreachable

* plumber work to get mmap text index to interfaces

* test: add fixture for mmap text index, always create mmap segment

* various fixes

- ensure dir is created for mmap
- implement is_on_disk() for text index
- invert deleted condition for filter in mmap inverted index

* update grpc docs and openapi

* implement return of files

* review nit

* fix after rebase

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-16 21:27:30 +02:00
Dominik Kellner
60d4ddd623 Clean temporary segments if optimization is cancelled (#5090)
This uses `TempDir` and comes with its caveats, e.g. the temporary segment
directory will not be deleted if the process exits. This should not be a
problem in practice, as all temporary segments get deleted when the shard is
loaded (see PR #2319).

Fixes #2978.
2024-09-16 20:47:31 +02:00
Arnaud Gourlay
a9e6849ec2 Optimize reading quantized vectors (#5091) 2024-09-16 18:44:18 +02:00
Andrey Vasnetsov
7aa53c3575 take deletes into account in mmap keyword index (#5089) 2024-09-16 16:20:06 +02:00
Tim Visée
4d7d908013 Improve immutable map index performance: sort point IDs, binary search and deleted flags (#5072)
* Improve immutable map index, sort values, binary search, deleted flags

* Add struct for value to points range and count
2024-09-16 15:29:03 +02:00
Arnaud Gourlay
ea6376feb1 Rename payload storage operations for consistency (#5087) 2024-09-16 12:42:11 +02:00
Ivan Pleshkov
54150f7358 remove unused WrongPayloadKey (#5086) 2024-09-16 10:54:11 +02:00
Andrey Vasnetsov
0585b70ba6 disable sparse tar arcive creation for backward compatibility (#5081) 2024-09-14 23:33:00 +02:00
Andrey Vasnetsov
e8d5cfc63c Allow explicit populate of mmap (#4923)
* expose mmap populate

* expose mmap populate in open_read_mmap

* FOR TEST, REVERSE IT: make InRamChunkedMmap default

* enable populate advise on unix

* fix clippy

* unix -> linux

* Update lib/collection/src/config.rs

* clippy fixes

* resolve conflicts

* fmt

* Runtime check for PopulateRead

---------

Co-authored-by: xzfc <xzfcpw@gmail.com>
2024-09-14 20:53:07 +02:00
Tim Visée
2339273c41 Tiny improvements in map index (#5077)
* Shrink to fit immutable map index after construction

* Simplify mutable map index loading a bit

* Preallocate value to points container because we know the exact size
2024-09-13 22:45:58 +02:00
xzfc
078402f459 Unpack snapshots with sync (#5075)
* refactor: Simplify open_snapshot_archive_with_validation

* feat: tar::Archive::set_sync(true)
2024-09-13 22:00:59 +02:00
Luis Cossío
7d2380a285 Refactor FullTextIndex as enum (#5067)
* refactor inverted index into trait

* create immutable and mutable versions of text index

* migrate to full text index enum

* fix clippy

* review remarks
2024-09-13 16:40:20 -03:00
xzfc
a6400138f8 Direct snapshot creation (#5061) 2024-09-12 19:39:15 +00:00
Ivan Pleshkov
af3f78c0cb Packed geohash (#4964)
* packed geohash

* refactor

* are you happy codespell

* review remarks

* better iterator

* iterator with only one field

* encode db key as smolstr

* Update geohash_starts_with

---------

Co-authored-by: xzfc <xzfcpw@gmail.com>
2024-09-10 22:56:17 +02:00
xzfc
4ee7d87206 Switch to sparse tar implementation (#4943) 2024-09-10 14:07:47 +00:00
Andrey Vasnetsov
b342cbca6e initial structures for reading mmap text index (#5029)
* initial structures for reading mmap text index

* creation of text index mmap

* WIP create mmap inverted index

* use same file writing technique as in MmapHashmap

* Save points_to_tokens_count in two files

* clippy

* fill slice with iterator

* review fixes

* fix after review

* implement loading of MmapInvertedIndex

* WIP: prepare for converting ChunkReader into trait

* fmt

* WIP: prepare ChunkReader to be a trai

* WIP: replace ChunkReaderImpl with trait

* implement chunk reader for mmap view

* rollback ChunkReader trait and remove CompressedMmapPostingListView

* move ImmutableInvertedIndex and MutableInvertedIndex into separate files

* impl ops for MmapInvertedIndex

* make mmap hashmap value param generic (#5042)

* make mmap hashmap value param generic

* test + fixes

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

Co-authored-by: Tim Visée <tim+github@visee.me>

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

Co-authored-by: Tim Visée <tim+github@visee.me>

* fixups

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: xzfc <xzfcpw@gmail.com>

* test and fix immutable to mmap conversion

* fix case 4 and refactor MmapBitSlice::create

* more tests

* fmt

---------

Co-authored-by: Luis Cossío <luis.cossio@outlook.com>
Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: xzfc <xzfcpw@gmail.com>
2024-09-10 12:02:05 +02:00
dependabot[bot]
25fd8cc0cb build(deps): bump smol_str from 0.2.2 to 0.3.1 (#5048)
Bumps [smol_str](https://github.com/rust-analyzer/smol_str) from 0.2.2 to 0.3.1.
- [Changelog](https://github.com/rust-analyzer/smol_str/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-analyzer/smol_str/compare/v0.2.2...v0.3.1)

---
updated-dependencies:
- dependency-name: smol_str
  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-09-10 07:45:43 +02:00
Andrey Vasnetsov
7447fff238 debug asserts for malformed hashmmap (#5030)
* debug asserts for malformed hashmmap

* Apply suggestions from code review

* Reformat using cargo fmt

---------

Co-authored-by: Tim Visée <tim+github@visee.me>
Co-authored-by: timvisee <tim@visee.me>
2024-09-09 10:46:06 +02:00
Luis Cossío
278153a242 Immutable text index without optional posting lists (#5040)
* discard unused token ids to slim down immutable text index

* clippy

* review: use custom types

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-09-07 19:07:55 +02:00
Andrey Vasnetsov
1712da623b Better json path parsing errors (#5035)
* report malformed json path inside error

* fmt
2024-09-06 14:53:44 +02:00
Arnaud Gourlay
b2d22c9792 Remove unecessary clippy allow deadcode (#5033) 2024-09-06 12:04:49 +02:00
Andrey Vasnetsov
90812ed683 prefer explicit function definitions instead of macros (#5022) 2024-09-04 19:16:04 +02:00
Luis Cossío
00e6ceadd4 do not include values with count 0 (#4987) 2024-08-30 08:58:28 -04:00
Andrey Vasnetsov
0a7226589a Refactor compressed posting list (#4948)
* move CompressedPostingList into a separate file

* decouple posting list from visitor using the reader abstraction

* refactor comressed_posting

* separate iterator into a new file + include diagram

* fmt

* decouple CompressedPostingList from PostingList

* decouple compression

* delete unused iter

* review: use correct names in diagrma

* review: fix comments

* review: code fixes

* fmt

* add tests

* hide compression logic
2024-08-30 13:59:33 +02:00
Luis Cossío
25c8ed050c Refactor condition converter, use uuid index there too (#4977)
* refactor condition converter, use uuid index here too

* re-disable index for values_count

* clippy
2024-08-29 11:16:43 +02:00
Jojii
e9bad464ff [Strict-Mode] Basic implementation (#4887)
* add CollectionRequestVerification

* add to api

* rebase

* improve implementation

* implement strict mode for SearchRequest+Batch

* improve code + fix Clippy

* improve error handling

* restructure StrictModeVerification trait

* generate docs

* check `enabled` option

* review remarks

* rename StrictModeConfigDiff in grpc

* use missing payload detection from issue api

* performance improvement

* decouple extractor from issues (#4945)

* some review remarks

* don't default to empty functions in StrictModeVerification trait

* update openapi

* filter_limit => query_limit

* replace discovery_max_context_size and recommend_max_examples with max_input_examples

* review remarks

* review fix: include possible index types into error message

* review remarks

---------

Co-authored-by: Luis Cossío <luis.cossio@qdrant.com>
Co-authored-by: generall <andrey@vasnetsov.com>
2024-08-29 10:49:23 +02:00
Luis Cossío
07be0a1aed Facets: add consistency param to openapi (#4969)
* add consistency param to openapi

* interpret uuid map index as facet index too
2024-08-28 09:18:02 -04:00
Tim Visée
b549d66851 Fix panic on payload indexing, don't mutably borrow as we don't need to (#4973) 2024-08-28 15:15:55 +02:00
Luis Cossío
b49e416382 Integer and UUID facets (#4946)
* move FacetIndex into facet_index.rs

* add support for integer facets

* add support for uuid facets

* use separate internal structure

* rename FacetValue::Keyword into FacetValue::String in REST

* fix after rebase
2024-08-27 11:30:57 -04:00
Andrey Vasnetsov
abd51d984a Implement better handling of UUID index (#4961)
* rename keyword -> string for internal data structures

* implement MatchAny and expect for filter on UUID mmap index

* implement MatchAny and expect for cardinality estimation on UUID mmap index

* refactor PayloadFieldIndex filter for handling incorrect empty query parsing case
2024-08-27 00:53:30 +02:00
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