nidx-binding 6.10.0.post718__tar.gz → 6.10.0.post719__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/PKG-INFO +1 -1
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/tests/common/mod.rs +2 -2
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/noderesources.proto +14 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/pyproject.toml +1 -1
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/tests/common/mod.rs +2 -2
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/tests/common/mod.rs +2 -2
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_types/src/lib.rs +2 -2
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/config.rs +31 -2
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v1/store.rs +3 -10
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v2/paragraph_store.rs +2 -1
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v2.rs +20 -2
- nidx_binding-6.10.0.post719/nidx_vector/src/field_list_metadata.rs +46 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/formula.rs +3 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/indexer.rs +80 -15
- nidx_binding-6.10.0.post718/nidx_vector/src/inverted_index.rs → nidx_binding-6.10.0.post719/nidx_vector/src/inverted_index/paragraph.rs +39 -103
- nidx_binding-6.10.0.post719/nidx_vector/src/inverted_index/relation.rs +82 -0
- nidx_binding-6.10.0.post719/nidx_vector/src/inverted_index.rs +106 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/lib.rs +68 -14
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/searcher.rs +33 -48
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/segment/tests.rs +38 -28
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/segment.rs +114 -91
- nidx_binding-6.10.0.post719/nidx_vector/src/utils.rs +145 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/tests/common/mod.rs +2 -2
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/tests/test_basic_search.rs +76 -25
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/tests/test_hidden.rs +2 -12
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/tests/test_maxsim.rs +3 -9
- nidx_binding-6.10.0.post719/nidx_vector/tests/test_relation.rs +775 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/pyproject.toml +1 -1
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/import_export.rs +1 -10
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/indexer.rs +2 -9
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/metadata/merge_job.rs +2 -9
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/metadata.rs +2 -9
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/scheduler/merge_task.rs +2 -9
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/index_cache.rs +2 -2
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/sync.rs +2 -9
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/worker.rs +2 -2
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/shards_api.rs +2 -9
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/synced_searcher.rs +2 -9
- nidx_binding-6.10.0.post718/nidx_vector/src/utils.rs +0 -45
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.config/nextest.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-0cfce9b29547f8f5bafa6e440f86103be7b8c4ad2fd92db9ac223f4efbe23d10.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-1a561eed00f3dbe868bf5030059793300209179dc8fb73e4b57a54b5e81262fe.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-1d3fca2682e25a01143da92285297f134a6a105a96f64d87e0db3abb219855e4.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-249b3b57c27a71baa823f1fe0f0bba9c9af36f61c28f731e58beea60ec48e687.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-263c8fce6db5b03bbd012fafdba6943cbee6ed7eb8976cdef4f5b01dde7ca6fd.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-2a5d92fb1638df830a4477a7cdf24e6db6b43034b7bbe74fdfb63e8afe2c4071.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-2b065a363f58caed60e3706603c1260dbf5a4c795604a5b68edda22eb07fec1b.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-3fc3cb39934683de8cd475ce1368c8373453eb1e01f81587d66b9d14b109ce6e.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-48f33b77b7c1633467b0b2efcaa1d3c207e7757e4f1d83b40d15e6ca365f7771.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-4ae09f2c08e2f324bee01bb8487a8f37678a1c5e9d327339235c50d4921a8949.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-4d7a76fa413c9ef0ce2a47ac7bb7e01d3e6a2aabded9487d21010a53efee8852.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-4fcbdd6657c7dc9b60b3a563dd41711b3dbcf72ce063427b7a01f8cddf34c244.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-577109ac00ccfbd38ecaccab94116f2f46a4caf5612afa372cded197123c1e08.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-5db25f97d8578d6d78f2f6bd4b72cc82a9b1b82805c6422d967ac63b20d99db4.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-5ec3233a3a23e926055056d46bdde17836a633066dbb5f349502648cd3ea9a60.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-66edb6ea424d8681927dcddb6bac5f1239175f4775d1f40417ba15054b0c6f19.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-6f9c6d201c1b5712efb68c363bffd3e0169c11f2a8f925e8cd4e8808599ff7b4.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-733c3ebacc86f444bf5e2dd79ade660c291e88a00fc09b722f6e2e191545874c.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-7a3bf27c330c468a596e8a297cf7d8b192e31e67ecc5177c1267f579e8e247c7.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-7a7e59e47b30b12237511fd3d7da2d17b0471ad2b006af48d6a6f587c779692b.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-7dcbb33312cc9f11ae3a6d73b1ace017a9f19a8bf8f10304fc57977c8efeadff.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-7efa7c0d747afc4b6aed0586ff846c27839c3213ff7ee9f30c89b0d0f17e60e3.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-8493140d788604d498a4e48da4158708572ccc9d60185290a00d549cc84533db.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-8493bb0059b013eaca42fd10cd7d04f0d06a8acaed379eff0d23f3229edde9ee.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-87996b3d6c7a2195438d7038015b06949102bce8c7b8cd8db1f83aaf23cbe489.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-8d33717587c6ee8f5fc339a80b1212a73d6c03e45856b1d55457fc8074709dd0.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-8f096d8171b89f9615d18f95d696dc9e4fb3674e103161a713cdc806f7a68506.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-917732a56ee04bf3a6e127319dda8225210869c82f9828d878162394dba4e078.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-9b67658569b343d8b4b61ae0a7dc721f367f2ba33c7b69b9e68bfd5c9bff5206.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-9c8062ea55d070afef68309e58fa987eb37fda44e1efbf68c8ba2af7846cc968.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-a06e1d9f6f95e4c4c2b98310ebddcc9d963cc033582bf2e945e8bf3a301b4247.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-a55265c9b07bd1399961a6f1e757201fd0eebe868ddaf96437111113d80fce92.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-a60ec2f66f1e7b84189e5b089f2087a29ff6a64326a3743dea935bbc58ee77fa.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-a891a37be5c2d7cce775c2dd33726b0318fd3839beab222a1b22bc6174604207.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-a945191bb4b3e37d6823ed3ad499339d007d69983105de8567777d9daf517b28.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-abe9f7832f2bd799ac44008da031e8d8ab52d4f5fbfc2a7e3974e8873bae55b2.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-aca588cca57a85e4d7fcc40c23cd87e57d53d11ca550d78e7e3d5e39e524fcd3.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-b02f8aafc00a7724510772ac41269e368c5bccf03ef7b4590e0ef6fd1a1bf64f.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-b742e17cabe2d64617e9aa64bafc782172f7a4f8023d1b54f952a0fb39f6b2b8.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-b94e349dbc0daec57f8f8f6e9e2dffb06100b1bb2b41d297c9f3b191da37a83d.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-bd9afa22994aba671dbf7b5f89b53c2ee02f53c0442a81265786a6d52d08512f.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-be60554eca98a5899efc6b49785cecd6444a6d39afed9e4a884ce2dbf162012c.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-bf49702b506c9a1650ece1f8e8d9f14834a902f8caefafe30ded55e2790f2188.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-bfcd21ed704cd305db5c17fcdec7d92aa4ac501913c9c9514d8ff92928c0c7e7.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-c3ab694650f49a75b146fb877a92e48c4f20f0d99f70f8ec859fbb763b01a1e5.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-c55542bb9fae544d87fae6f30e0fe8a9088d12075f4442ab4fe2fcd05e472234.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-cb29a6556d35ac630ee0aa885dd7341cf9573bd3efd216ff8a887b87686b03db.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-d0a1f341a89f5f14696b10baa72db9d95551c2b7e5fc67308fd52dc03dd98a92.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-d2ad0a0ca2649c9e4873cfcc1fc66d2d07cc45d0f65c560b06d7b5f592f4fa8a.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-d6cfe78eb635ba0b89ca4021a4dc8182d18ab5b197f30149cd28488eba4c1df5.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-d729b56dea00e49dcdba8cf0001e2811da27351eabe98212db3b589f18fc6f32.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-d9658bfd4e7170b41d03f2ddf2446d0bf54171c0d39d53bf20af2b8437f2ec48.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-dbba7b3d3289425bae711aedbf73fbc3699f857f86f84d95c3b556d05c5658b0.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-dcb96b649d6d63a58efd5d445453a4f3d7869a56ff714b69bedf3d616a0473ca.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-ebd876fbf5362a5900e75bc05f2f11c73c406ef7da4e95097fc6a1c3d1b8bc54.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-eef5cc6bce1cc14eba8f3e68971724ef181e88cffcedd74673615f2026b89a62.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-ef56d5fefc5774040d1ee397beadb475f6af02768c22f0e583c74062e2e821ce.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/.sqlx/query-fd97b359c7a7cdc573b2112efbafb9956ae71d8f875c38140cba1c04b7084b47.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/Cargo.lock +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/README.md +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/migrations/20241007163501_initial.sql +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/migrations/20241211120039_merge_job_priority.sql +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/migrations/20241211121159_basic_indexes.sql +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/migrations/20241212151105_check_segment_records.sql +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/migrations/20250110145554_in_flight_messages.sql +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_binding/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_binding/src/lib.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/fuzzy_query.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/lib.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/query_io.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/query_parser/fuzzy_parser.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/query_parser/keyword_parser.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/query_parser/stop_words.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/query_parser/tokenizer.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/query_parser.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/reader.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/request_types.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/resource_indexer.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/schema.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/search_query.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/search_response.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/src/set_query.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/README.md +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/ar.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/az.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/bn.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/ca.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/ch.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/da.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/de.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/el.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/en.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/es.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/eu.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/extract.py +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/fi.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/fr.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/he.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/hu.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/id.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/it.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/kk.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/ne.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/nl.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/no.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/pt.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/ro.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/ru.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/sl.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/sv.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/tg.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/stop_words/tr.json +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/tests/reader.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/build.py +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/build.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/nidx.proto +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/nodereader.proto +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/nodewriter.proto +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_protos/src/lib.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/src/graph_collector.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/src/graph_query_parser.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/src/io_maps.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/src/lib.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/src/reader.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/src/resource_indexer.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/src/schema.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/src/top_unique_n.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/tests/test_graph_query_parser_search.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/tests/test_graph_search.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/tests/test_writer.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_tantivy/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_tantivy/src/index_reader.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_tantivy/src/lib.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_tantivy/src/utils.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_tests/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_tests/src/graph.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_tests/src/lib.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/src/lib.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/src/prefilter.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/src/query_io.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/src/reader.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/src/request_types.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/src/resource_indexer.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/src/schema.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/src/search_query.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/tests/test_deletions.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/tests/test_flow.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/tests/test_search.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_text/tests/test_streaming.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_types/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_types/src/prefilter.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_types/src/query_language.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/Cargo.toml +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v1/node.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v1/trie.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v1/trie_ram.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v1.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v2/quant_vector_store.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v2/vector_store.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_types.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/hnsw/build.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/hnsw/disk/v1.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/hnsw/disk/v2.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/hnsw/disk.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/hnsw/params.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/hnsw/ram_hnsw.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/hnsw/search.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/hnsw.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/inverted_index/fst_index.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/inverted_index/map.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/multivector.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/query_io.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/request_types.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/vector_types/dense_f32.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/vector_types/mod.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/vector_types/rabitq.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/api/grpc.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/api/shards.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/api.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/control.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/errors.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/grpc_server.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/lib.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/main.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/metadata/deletion.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/metadata/index.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/metadata/index_request.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/metadata/segment.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/metadata/shard.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/metrics.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/scheduler/audit_task.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/scheduler/log_merge.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/scheduler/metrics_task.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/scheduler/purge_tasks.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/scheduler/vector_merge.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/scheduler.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/grpc.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/query_language.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/query_planner.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/shard_search.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/shard_selector.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/shard_suggest.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher/streams.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/searcher.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/segment_store.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/settings.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/telemetry/duration_layer.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/telemetry/log_format.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/telemetry/middleware.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/telemetry.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/tool.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/src/utilization_tracker.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/common/mod.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/common/services.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/date_range_search.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/mod.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/search_filtering.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/search_relations.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/search_sorting.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/searcher_cluster.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/security_search.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/shards.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/suggest.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/vector_normalization.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/integration/vectorsets.rs +0 -0
- {nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/tests/test_integration.rs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nidx_binding
|
|
3
|
-
Version: 6.10.0.
|
|
3
|
+
Version: 6.10.0.post719
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
{nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_paragraph/tests/common/mod.rs
RENAMED
|
@@ -38,11 +38,11 @@ impl TestOpener {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
impl OpenIndexMetadata<TantivyMeta> for TestOpener {
|
|
41
|
-
fn segments(&self) -> impl
|
|
41
|
+
fn segments(&self) -> impl DoubleEndedIterator<Item = (nidx_types::SegmentMetadata<TantivyMeta>, nidx_types::Seq)> {
|
|
42
42
|
self.segments.iter().cloned()
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
fn deletions(&self) -> impl
|
|
45
|
+
fn deletions(&self) -> impl DoubleEndedIterator<Item = (&String, nidx_types::Seq)> {
|
|
46
46
|
self.deletions.iter().map(|(key, seq)| (key, *seq))
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -165,6 +165,20 @@ message Resource {
|
|
|
165
165
|
// Boleans to indicate if the indexing needs to be done
|
|
166
166
|
bool skip_texts = 18;
|
|
167
167
|
bool skip_paragraphs = 19;
|
|
168
|
+
|
|
169
|
+
repeated RelationNodeVector relation_node_vectors = 20;
|
|
170
|
+
repeated RelationVector relation_vectors = 21;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
message RelationNodeVector {
|
|
174
|
+
utils.RelationNode node = 1;
|
|
175
|
+
repeated float vector = 2;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
message RelationVector {
|
|
179
|
+
utils.Relation.RelationType relation_type = 1;
|
|
180
|
+
string relation_label = 2;
|
|
181
|
+
repeated float vector = 3;
|
|
168
182
|
}
|
|
169
183
|
|
|
170
184
|
message ShardMetadata {
|
|
@@ -10,7 +10,7 @@ build-backend = "pdm.backend"
|
|
|
10
10
|
|
|
11
11
|
[project]
|
|
12
12
|
name = "nidx_protos"
|
|
13
|
-
version = "6.10.0.
|
|
13
|
+
version = "6.10.0.post719"
|
|
14
14
|
license = "AGPL-3.0-or-later"
|
|
15
15
|
description = "Protobuf definitions for nucliadb/nidx"
|
|
16
16
|
authors = [{ name = "Nuclia", email = "nucliadb@nuclia.com" }]
|
{nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_relation/tests/common/mod.rs
RENAMED
|
@@ -38,11 +38,11 @@ impl TestOpener {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
impl OpenIndexMetadata<TantivyMeta> for TestOpener {
|
|
41
|
-
fn segments(&self) -> impl
|
|
41
|
+
fn segments(&self) -> impl DoubleEndedIterator<Item = (nidx_types::SegmentMetadata<TantivyMeta>, nidx_types::Seq)> {
|
|
42
42
|
self.segments.iter().cloned()
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
fn deletions(&self) -> impl
|
|
45
|
+
fn deletions(&self) -> impl DoubleEndedIterator<Item = (&String, nidx_types::Seq)> {
|
|
46
46
|
self.deletions.iter().map(|(key, seq)| (key, *seq))
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -42,11 +42,11 @@ impl TestOpener {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
impl OpenIndexMetadata<TantivyMeta> for TestOpener {
|
|
45
|
-
fn segments(&self) -> impl
|
|
45
|
+
fn segments(&self) -> impl DoubleEndedIterator<Item = (nidx_types::SegmentMetadata<TantivyMeta>, nidx_types::Seq)> {
|
|
46
46
|
self.segments.iter().cloned()
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
fn deletions(&self) -> impl
|
|
49
|
+
fn deletions(&self) -> impl DoubleEndedIterator<Item = (&String, nidx_types::Seq)> {
|
|
50
50
|
self.deletions.iter().map(|(key, seq)| (key, *seq))
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -55,7 +55,7 @@ pub struct SegmentMetadata<T> {
|
|
|
55
55
|
/// The metadata needed to open an index: a list of segments and deletions.
|
|
56
56
|
pub trait OpenIndexMetadata<T> {
|
|
57
57
|
/// List of segments and Seq
|
|
58
|
-
fn segments(&self) -> impl
|
|
58
|
+
fn segments(&self) -> impl DoubleEndedIterator<Item = (SegmentMetadata<T>, Seq)>;
|
|
59
59
|
/// List of deletions and Seq
|
|
60
|
-
fn deletions(&self) -> impl
|
|
60
|
+
fn deletions(&self) -> impl DoubleEndedIterator<Item = (&String, Seq)>;
|
|
61
61
|
}
|
|
@@ -95,6 +95,13 @@ pub enum VectorCardinality {
|
|
|
95
95
|
Multi,
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
|
99
|
+
pub enum IndexEntity {
|
|
100
|
+
#[default]
|
|
101
|
+
Paragraph,
|
|
102
|
+
Relation,
|
|
103
|
+
}
|
|
104
|
+
|
|
98
105
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
99
106
|
pub struct VectorConfig {
|
|
100
107
|
#[serde(default)]
|
|
@@ -107,10 +114,32 @@ pub struct VectorConfig {
|
|
|
107
114
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
|
108
115
|
pub flags: Vec<String>,
|
|
109
116
|
#[serde(default)]
|
|
110
|
-
pub
|
|
117
|
+
pub entity: IndexEntity,
|
|
111
118
|
}
|
|
112
119
|
|
|
113
120
|
impl VectorConfig {
|
|
121
|
+
pub const fn for_paragraphs(vector_type: VectorType) -> Self {
|
|
122
|
+
Self {
|
|
123
|
+
vector_type,
|
|
124
|
+
similarity: Similarity::Dot,
|
|
125
|
+
normalize_vectors: false,
|
|
126
|
+
vector_cardinality: VectorCardinality::Single,
|
|
127
|
+
flags: vec![],
|
|
128
|
+
entity: IndexEntity::Paragraph,
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
pub const fn for_relations(vector_type: VectorType) -> Self {
|
|
133
|
+
Self {
|
|
134
|
+
vector_type,
|
|
135
|
+
similarity: Similarity::Dot,
|
|
136
|
+
normalize_vectors: false,
|
|
137
|
+
vector_cardinality: VectorCardinality::Single,
|
|
138
|
+
flags: vec![],
|
|
139
|
+
entity: IndexEntity::Relation,
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
114
143
|
pub fn similarity_function(&self) -> fn(&[u8], &[u8]) -> f32 {
|
|
115
144
|
match (&self.similarity, &self.vector_type) {
|
|
116
145
|
(Similarity::Dot, VectorType::DenseF32 { .. }) => dense_f32::dot_similarity,
|
|
@@ -146,7 +175,7 @@ impl TryFrom<VectorIndexConfig> for VectorConfig {
|
|
|
146
175
|
vector_type,
|
|
147
176
|
flags: vec![],
|
|
148
177
|
vector_cardinality: VectorCardinality::Single,
|
|
149
|
-
|
|
178
|
+
entity: IndexEntity::Paragraph,
|
|
150
179
|
})
|
|
151
180
|
}
|
|
152
181
|
}
|
{nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v1/store.rs
RENAMED
|
@@ -211,16 +211,9 @@ pub fn merge(
|
|
|
211
211
|
#[cfg(test)]
|
|
212
212
|
mod tests {
|
|
213
213
|
use super::*;
|
|
214
|
-
use crate::
|
|
215
|
-
|
|
216
|
-
const VECTOR_CONFIG: VectorConfig = VectorConfig {
|
|
217
|
-
vector_type: VectorType::DenseF32 { dimension: 3 },
|
|
218
|
-
similarity: crate::config::Similarity::Dot,
|
|
219
|
-
normalize_vectors: false,
|
|
220
|
-
flags: vec![],
|
|
221
|
-
vector_cardinality: VectorCardinality::Single,
|
|
222
|
-
disable_indexes: false,
|
|
223
|
-
};
|
|
214
|
+
use crate::segment::Elem;
|
|
215
|
+
|
|
216
|
+
const VECTOR_CONFIG: VectorConfig = VectorConfig::for_paragraphs(VectorType::DenseF32 { dimension: 3 });
|
|
224
217
|
|
|
225
218
|
#[test]
|
|
226
219
|
fn store_test() {
|
|
@@ -146,12 +146,13 @@ impl ParagraphStoreWriter {
|
|
|
146
146
|
paragraph: ParagraphRef,
|
|
147
147
|
first_vector: u32,
|
|
148
148
|
num_vectors: u32,
|
|
149
|
+
override_metadata: Option<&[u8]>,
|
|
149
150
|
) -> VectorR<u32> {
|
|
150
151
|
let labels = paragraph.labels();
|
|
151
152
|
let paragraph = StoredParagraph {
|
|
152
153
|
key: paragraph.id(),
|
|
153
154
|
labels: labels.iter().map(|x| x.as_str()).collect(),
|
|
154
|
-
metadata: paragraph.metadata(),
|
|
155
|
+
metadata: override_metadata.unwrap_or(paragraph.metadata()),
|
|
155
156
|
first_vector,
|
|
156
157
|
num_vectors,
|
|
157
158
|
};
|
{nidx_binding-6.10.0.post718 → nidx_binding-6.10.0.post719}/nidx_vector/src/data_store/v2.rs
RENAMED
|
@@ -29,7 +29,7 @@ use crate::{
|
|
|
29
29
|
use super::{DataStore, OpenReason, ParagraphAddr, VectorAddr};
|
|
30
30
|
pub use paragraph_store::StoredParagraph;
|
|
31
31
|
use paragraph_store::{ParagraphStore, ParagraphStoreWriter};
|
|
32
|
-
use std::path::Path;
|
|
32
|
+
use std::{collections::HashMap, path::Path};
|
|
33
33
|
use vector_store::{VectorStore, VectorStoreWriter};
|
|
34
34
|
|
|
35
35
|
mod paragraph_store;
|
|
@@ -88,6 +88,7 @@ impl DataStoreV2 {
|
|
|
88
88
|
path: &Path,
|
|
89
89
|
producers: Vec<(impl Iterator<Item = ParagraphAddr>, &dyn DataStore)>,
|
|
90
90
|
config: &VectorConfig,
|
|
91
|
+
mut paragraph_deduplicator: Option<HashMap<String, Vec<u8>>>,
|
|
91
92
|
) -> VectorR<()> {
|
|
92
93
|
let mut paragraphs = ParagraphStoreWriter::new(path)?;
|
|
93
94
|
let mut vectors = VectorStoreWriter::new(path, &config.vector_type)?;
|
|
@@ -104,6 +105,17 @@ impl DataStoreV2 {
|
|
|
104
105
|
let paragraph = store.get_paragraph(paragraph_addr);
|
|
105
106
|
let p_vectors = paragraph.vectors(¶graph_addr).map(|v| store.get_vector(v).vector());
|
|
106
107
|
|
|
108
|
+
let metadata = if let Some(paragraph_deduplicator) = &mut paragraph_deduplicator {
|
|
109
|
+
// Entry is removed so if it appears in other segments it is not copied again
|
|
110
|
+
let metadata = paragraph_deduplicator.remove(paragraph.id());
|
|
111
|
+
if metadata.is_none() {
|
|
112
|
+
continue;
|
|
113
|
+
};
|
|
114
|
+
metadata
|
|
115
|
+
} else {
|
|
116
|
+
None
|
|
117
|
+
};
|
|
118
|
+
|
|
107
119
|
// Write to new store
|
|
108
120
|
let (first_vector, last_vector) = vectors.write(p_idx, p_vectors)?;
|
|
109
121
|
if let Some(quantized) = &mut quantized {
|
|
@@ -120,7 +132,13 @@ impl DataStoreV2 {
|
|
|
120
132
|
}
|
|
121
133
|
}
|
|
122
134
|
|
|
123
|
-
paragraphs.write_paragraph_ref(
|
|
135
|
+
paragraphs.write_paragraph_ref(
|
|
136
|
+
paragraph,
|
|
137
|
+
first_vector,
|
|
138
|
+
last_vector - first_vector + 1,
|
|
139
|
+
metadata.as_deref(),
|
|
140
|
+
)?;
|
|
141
|
+
|
|
124
142
|
p_idx += 1;
|
|
125
143
|
}
|
|
126
144
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Copyright (C) 2021 Bosutech XXI S.L.
|
|
2
|
+
//
|
|
3
|
+
// nucliadb is offered under the AGPL v3.0 and as commercial software.
|
|
4
|
+
// For commercial licensing, contact us at info@nuclia.com.
|
|
5
|
+
//
|
|
6
|
+
// AGPL:
|
|
7
|
+
// This program is free software: you can redistribute it and/or modify
|
|
8
|
+
// it under the terms of the GNU Affero General Public License as
|
|
9
|
+
// published by the Free Software Foundation, either version 3 of the
|
|
10
|
+
// License, or (at your option) any later version.
|
|
11
|
+
//
|
|
12
|
+
// This program is distributed in the hope that it will be useful,
|
|
13
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
// GNU Affero General Public License for more details.
|
|
16
|
+
//
|
|
17
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
18
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
//
|
|
20
|
+
|
|
21
|
+
use std::collections::HashSet;
|
|
22
|
+
|
|
23
|
+
use crate::{data_store::ParagraphRef, utils::FieldKey};
|
|
24
|
+
|
|
25
|
+
pub fn encode_field_list_metadata(encoded_fields: &[FieldKey]) -> Vec<u8> {
|
|
26
|
+
bincode::encode_to_vec(encoded_fields, bincode::config::standard()).unwrap()
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
pub fn decode_field_list_metadata(data: &[u8]) -> Vec<FieldKey<'_>> {
|
|
30
|
+
let (fields, _) = bincode::borrow_decode_from_slice(data, bincode::config::standard()).unwrap();
|
|
31
|
+
fields
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
pub fn paragraph_alive_fields<'a>(
|
|
35
|
+
paragraph: &'a ParagraphRef,
|
|
36
|
+
keys: &HashSet<FieldKey<'a>>,
|
|
37
|
+
) -> impl Iterator<Item = FieldKey<'a>> {
|
|
38
|
+
let fields = decode_field_list_metadata(paragraph.metadata());
|
|
39
|
+
fields
|
|
40
|
+
.into_iter()
|
|
41
|
+
.filter(|f| !keys.contains(f) && !keys.contains(&FieldKey::from_bytes(f.resource_id())))
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
pub fn paragraph_is_deleted(paragraph: &ParagraphRef, keys: &HashSet<FieldKey>) -> bool {
|
|
45
|
+
paragraph_alive_fields(paragraph, keys).next().is_none()
|
|
46
|
+
}
|
|
@@ -18,13 +18,15 @@
|
|
|
18
18
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
19
|
|
|
20
20
|
use crate::config::{VectorCardinality, VectorConfig};
|
|
21
|
+
use crate::field_list_metadata::encode_field_list_metadata;
|
|
21
22
|
use crate::multivector::extract_multi_vectors;
|
|
22
23
|
use crate::segment::{self, Elem};
|
|
24
|
+
use crate::utils::FieldKey;
|
|
23
25
|
use crate::{VectorSegmentMetadata, utils};
|
|
24
|
-
use
|
|
25
|
-
use
|
|
26
|
+
use anyhow::anyhow;
|
|
27
|
+
use nidx_protos::{Resource, noderesources, prost::*};
|
|
28
|
+
use std::collections::{HashMap, HashSet};
|
|
26
29
|
use std::path::Path;
|
|
27
|
-
use std::time::Instant;
|
|
28
30
|
use tracing::*;
|
|
29
31
|
|
|
30
32
|
pub const SEGMENT_TAGS: &[&str] = &["/q/h"];
|
|
@@ -102,11 +104,7 @@ pub fn index_resource(
|
|
|
102
104
|
output_path: &Path,
|
|
103
105
|
config: &VectorConfig,
|
|
104
106
|
) -> anyhow::Result<Option<VectorSegmentMetadata>> {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
debug!("Updating main index");
|
|
108
|
-
let v = time.elapsed().as_millis();
|
|
109
|
-
debug!("Creating elements for the main index: starts {v} ms");
|
|
107
|
+
debug!("Creating elements for the main index");
|
|
110
108
|
|
|
111
109
|
let mut elems = Vec::new();
|
|
112
110
|
let normalize_vectors = config.normalize_vectors;
|
|
@@ -136,11 +134,6 @@ pub fn index_resource(
|
|
|
136
134
|
}
|
|
137
135
|
}
|
|
138
136
|
}
|
|
139
|
-
let v = time.elapsed().as_millis();
|
|
140
|
-
debug!("Creating elements for the main index: ends {v} ms");
|
|
141
|
-
|
|
142
|
-
let v = time.elapsed().as_millis();
|
|
143
|
-
debug!("Main index set resource: starts {v} ms");
|
|
144
137
|
|
|
145
138
|
if elems.is_empty() {
|
|
146
139
|
return Ok(None);
|
|
@@ -152,10 +145,82 @@ pub fn index_resource(
|
|
|
152
145
|
.filter(|t| SEGMENT_TAGS.contains(&t.as_str()))
|
|
153
146
|
.cloned()
|
|
154
147
|
.collect();
|
|
148
|
+
|
|
149
|
+
debug!("Creating the segment");
|
|
155
150
|
let segment = segment::create(output_path, elems, config, tags)?;
|
|
156
151
|
|
|
157
|
-
|
|
158
|
-
|
|
152
|
+
Ok(Some(segment.into_metadata()))
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
fn encode_metadata_field(rid: &str, fields: &HashSet<&String>) -> Vec<u8> {
|
|
156
|
+
let encoded_fields: Vec<_> = fields
|
|
157
|
+
.iter()
|
|
158
|
+
.map(|f| format!("{rid}/{f}"))
|
|
159
|
+
.filter_map(|f| FieldKey::from_field_id(&f))
|
|
160
|
+
.collect();
|
|
161
|
+
encode_field_list_metadata(&encoded_fields)
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
pub fn index_relations(
|
|
165
|
+
resource: &Resource,
|
|
166
|
+
output_path: &Path,
|
|
167
|
+
config: &VectorConfig,
|
|
168
|
+
) -> anyhow::Result<Option<VectorSegmentMetadata>> {
|
|
169
|
+
debug!("Creating elements for the main index");
|
|
170
|
+
|
|
171
|
+
let mut entity_fields = HashMap::new();
|
|
172
|
+
let Some(resource_id) = &resource.resource else {
|
|
173
|
+
return Err(anyhow!("resource_id required"));
|
|
174
|
+
};
|
|
175
|
+
let rid = &resource_id.uuid;
|
|
176
|
+
|
|
177
|
+
for (field, relations) in &resource.field_relations {
|
|
178
|
+
for relation in &relations.relations {
|
|
179
|
+
let Some(relation) = &relation.relation else {
|
|
180
|
+
return Err(anyhow!("relation required"));
|
|
181
|
+
};
|
|
182
|
+
let Some(source) = &relation.source else {
|
|
183
|
+
return Err(anyhow!("relation source node required"));
|
|
184
|
+
};
|
|
185
|
+
entity_fields
|
|
186
|
+
.entry(source.value.clone())
|
|
187
|
+
.or_insert_with(HashSet::new)
|
|
188
|
+
.insert(field);
|
|
189
|
+
|
|
190
|
+
let Some(to) = &relation.to else {
|
|
191
|
+
return Err(anyhow!("relation to node required"));
|
|
192
|
+
};
|
|
193
|
+
entity_fields
|
|
194
|
+
.entry(to.value.clone())
|
|
195
|
+
.or_insert_with(HashSet::new)
|
|
196
|
+
.insert(field);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
let mut elems = Vec::new();
|
|
201
|
+
for node_vector in &resource.relation_node_vectors {
|
|
202
|
+
let vector = node_vector.vector.clone();
|
|
203
|
+
let Some(node) = &node_vector.node else {
|
|
204
|
+
return Err(anyhow!("relation node required"));
|
|
205
|
+
};
|
|
206
|
+
let fields = entity_fields.get(&node.value);
|
|
207
|
+
let Some(fields) = fields else {
|
|
208
|
+
continue;
|
|
209
|
+
};
|
|
210
|
+
elems.push(Elem::new(
|
|
211
|
+
node.value.clone(),
|
|
212
|
+
vector,
|
|
213
|
+
vec![],
|
|
214
|
+
Some(encode_metadata_field(rid, fields)),
|
|
215
|
+
));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if elems.is_empty() {
|
|
219
|
+
return Ok(None);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
debug!("Creating the segment");
|
|
223
|
+
let segment = segment::create(output_path, elems, config, HashSet::new())?;
|
|
159
224
|
|
|
160
225
|
Ok(Some(segment.into_metadata()))
|
|
161
226
|
}
|
|
@@ -17,27 +17,27 @@
|
|
|
17
17
|
// You should have received a copy of the GNU Affero General Public License
|
|
18
18
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
19
|
|
|
20
|
-
use std::{
|
|
20
|
+
use std::{path::Path, sync::Arc};
|
|
21
21
|
|
|
22
22
|
use bit_set::BitSet;
|
|
23
23
|
use bit_vec::BitVec;
|
|
24
|
-
use fst_index::{FstIndexReader, FstIndexWriter};
|
|
25
|
-
use map::{InvertedMapReader, InvertedMapWriter};
|
|
26
|
-
use tracing::warn;
|
|
27
24
|
|
|
25
|
+
use super::{
|
|
26
|
+
IndexBuilder, OpenOptions, file,
|
|
27
|
+
fst_index::{FstIndexReader, FstIndexWriter},
|
|
28
|
+
map::{InvertedMapReader, InvertedMapWriter},
|
|
29
|
+
};
|
|
28
30
|
use crate::{
|
|
29
31
|
ParagraphAddr, VectorR,
|
|
30
32
|
data_store::{DataStore, iter_paragraphs},
|
|
31
33
|
formula::{BooleanOperator, Clause, Formula},
|
|
34
|
+
utils::FieldKey,
|
|
32
35
|
};
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
pub const INDEX_MAP: &str = "index.map";
|
|
39
|
-
pub const FIELD_INDEX: &str = "field.fst";
|
|
40
|
-
pub const LABEL_INDEX: &str = "label.fst";
|
|
37
|
+
pub struct ParagraphInvertedIndexes {
|
|
38
|
+
field_index: FstIndexReader,
|
|
39
|
+
label_index: FstIndexReader,
|
|
40
|
+
records: usize,
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
pub struct FilterBitSet(BitSet);
|
|
@@ -64,110 +64,46 @@ impl FilterBitSet {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
/// The key for the field index. [uuid_as_bytes, field_type/field_name]
|
|
68
|
-
fn field_id_key(paragraph_key: &str) -> Option<Vec<u8>> {
|
|
69
|
-
let mut parts = paragraph_key.split('/');
|
|
70
|
-
if let Some(uuid) = parts.next() {
|
|
71
|
-
if let Some(field_type) = parts.next() {
|
|
72
|
-
if let Some(field_name) = parts.next() {
|
|
73
|
-
return Some(
|
|
74
|
-
[
|
|
75
|
-
uuid::Uuid::parse_str(uuid).unwrap().as_bytes(),
|
|
76
|
-
field_type.as_bytes(),
|
|
77
|
-
"/".as_bytes(),
|
|
78
|
-
field_name.as_bytes(),
|
|
79
|
-
]
|
|
80
|
-
.concat(),
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
} else {
|
|
84
|
-
return Some(uuid::Uuid::parse_str(uuid).unwrap().as_bytes().to_vec());
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
warn!(?paragraph_key, "Unable to parse field id from key");
|
|
88
|
-
None
|
|
89
|
-
}
|
|
90
|
-
|
|
91
67
|
/// The key for the labels, ending with a separator to allow for easy prefix search
|
|
92
68
|
fn labels_key(label: &str) -> Vec<u8> {
|
|
93
69
|
[&label.as_bytes()[1..], "/".as_bytes()].concat()
|
|
94
70
|
}
|
|
95
71
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
impl IndexBuilder {
|
|
102
|
-
pub fn new() -> Self {
|
|
103
|
-
Self {
|
|
104
|
-
ordered_keys: Default::default(),
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
pub fn insert(&mut self, key: Vec<u8>, ParagraphAddr(id): ParagraphAddr) {
|
|
109
|
-
self.ordered_keys.entry(key).or_default().push(id);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
pub fn write(self, index_writer: &mut FstIndexWriter) -> VectorR<()> {
|
|
113
|
-
for (key, mut values) in self.ordered_keys {
|
|
114
|
-
values.sort();
|
|
115
|
-
index_writer.write(&key, &values)?;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
Ok(())
|
|
72
|
+
impl ParagraphInvertedIndexes {
|
|
73
|
+
pub fn space_usage(&self) -> usize {
|
|
74
|
+
self.field_index.space_usage() + self.label_index.space_usage()
|
|
119
75
|
}
|
|
120
|
-
}
|
|
121
76
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
let mut label_builder = IndexBuilder::new();
|
|
77
|
+
pub fn build(work_path: &Path, data_store: &impl DataStore) -> VectorR<()> {
|
|
78
|
+
let mut field_builder = IndexBuilder::new();
|
|
79
|
+
let mut label_builder = IndexBuilder::new();
|
|
126
80
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
81
|
+
for paragraph_addr in iter_paragraphs(data_store) {
|
|
82
|
+
let paragraph = data_store.get_paragraph(paragraph_addr);
|
|
83
|
+
let key = paragraph.id();
|
|
84
|
+
let labels = paragraph.labels();
|
|
131
85
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
86
|
+
if let Some(key) = FieldKey::from_field_id(key) {
|
|
87
|
+
field_builder.insert(key.bytes().to_vec(), paragraph_addr);
|
|
88
|
+
}
|
|
89
|
+
for l in labels {
|
|
90
|
+
label_builder.insert(labels_key(&l), paragraph_addr);
|
|
91
|
+
}
|
|
137
92
|
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
let mut map = InvertedMapWriter::new(&work_path.join(file::INDEX_MAP))?;
|
|
141
|
-
let mut field_index = FstIndexWriter::new(&work_path.join(file::FIELD_INDEX), &mut map)?;
|
|
142
|
-
field_builder.write(&mut field_index)?;
|
|
143
|
-
field_index.finish()?;
|
|
144
|
-
|
|
145
|
-
let mut label_index = FstIndexWriter::new(&work_path.join(file::LABEL_INDEX), &mut map)?;
|
|
146
|
-
label_builder.write(&mut label_index)?;
|
|
147
|
-
label_index.finish()?;
|
|
148
|
-
|
|
149
|
-
map.finish()?;
|
|
150
93
|
|
|
151
|
-
|
|
152
|
-
}
|
|
94
|
+
let mut map = InvertedMapWriter::new(&work_path.join(file::INDEX_MAP))?;
|
|
153
95
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
96
|
+
let mut field_index = FstIndexWriter::new(&work_path.join(file::FIELD_INDEX), &mut map)?;
|
|
97
|
+
field_builder.write(&mut field_index)?;
|
|
98
|
+
field_index.finish()?;
|
|
157
99
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
records: usize,
|
|
162
|
-
}
|
|
100
|
+
let mut label_index = FstIndexWriter::new(&work_path.join(file::LABEL_INDEX), &mut map)?;
|
|
101
|
+
label_builder.write(&mut label_index)?;
|
|
102
|
+
label_index.finish()?;
|
|
163
103
|
|
|
164
|
-
|
|
165
|
-
pub fn space_usage(&self) -> usize {
|
|
166
|
-
self.field_index.space_usage() + self.label_index.space_usage()
|
|
167
|
-
}
|
|
104
|
+
map.finish()?;
|
|
168
105
|
|
|
169
|
-
|
|
170
|
-
path.join(file::INDEX_MAP).exists()
|
|
106
|
+
Ok(())
|
|
171
107
|
}
|
|
172
108
|
|
|
173
109
|
pub fn open(work_path: &Path, records: usize, options: OpenOptions) -> VectorR<Self> {
|
|
@@ -185,8 +121,8 @@ impl InvertedIndexes {
|
|
|
185
121
|
})
|
|
186
122
|
}
|
|
187
123
|
|
|
188
|
-
pub fn ids_for_deletion_key(&self, key: &
|
|
189
|
-
|
|
124
|
+
pub fn ids_for_deletion_key(&self, key: &FieldKey) -> impl Iterator<Item = ParagraphAddr> {
|
|
125
|
+
self.field_index.get_prefix(key.bytes()).into_iter().map(ParagraphAddr)
|
|
190
126
|
}
|
|
191
127
|
|
|
192
128
|
pub fn filter(&self, formula: &Formula) -> Option<FilterBitSet> {
|
|
@@ -214,7 +150,7 @@ impl InvertedIndexes {
|
|
|
214
150
|
}
|
|
215
151
|
crate::formula::AtomClause::KeyPrefixSet(field_ids) => &mut field_ids
|
|
216
152
|
.iter()
|
|
217
|
-
.filter_map(|id|
|
|
153
|
+
.filter_map(|id| FieldKey::from_field_id(id).map(|k| self.field_index.get(k.bytes())))
|
|
218
154
|
.flatten()
|
|
219
155
|
.flatten(),
|
|
220
156
|
};
|