nidx-binding 6.6.1.post415__tar.gz → 6.6.1.post421__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.6.1.post415 → nidx_binding-6.6.1.post421}/PKG-INFO +1 -1
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/pyproject.toml +1 -1
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point/mod.rs +76 -115
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point/ops_hnsw.rs +11 -11
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point_provider/reader.rs +8 -8
- {nidx_binding-6.6.1.post415/nidx_vector/src/data_point → nidx_binding-6.6.1.post421/nidx_vector/src/data_store}/node.rs +44 -40
- nidx_binding-6.6.1.post415/nidx_vector/src/data_types/data_store.rs → nidx_binding-6.6.1.post421/nidx_vector/src/data_store/store.rs +15 -22
- nidx_binding-6.6.1.post421/nidx_vector/src/data_store.rs +113 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_types/mod.rs +0 -1
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/inverted_index.rs +6 -7
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/lib.rs +1 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/pyproject.toml +1 -1
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.config/nextest.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-0cfce9b29547f8f5bafa6e440f86103be7b8c4ad2fd92db9ac223f4efbe23d10.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-1a561eed00f3dbe868bf5030059793300209179dc8fb73e4b57a54b5e81262fe.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-1d3fca2682e25a01143da92285297f134a6a105a96f64d87e0db3abb219855e4.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-249b3b57c27a71baa823f1fe0f0bba9c9af36f61c28f731e58beea60ec48e687.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-24cb6b683daa42d7125f862e25943ab4be7bf275cd8739f8da4859d701795e1a.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-263c8fce6db5b03bbd012fafdba6943cbee6ed7eb8976cdef4f5b01dde7ca6fd.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-2a5d92fb1638df830a4477a7cdf24e6db6b43034b7bbe74fdfb63e8afe2c4071.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-2b065a363f58caed60e3706603c1260dbf5a4c795604a5b68edda22eb07fec1b.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-3fc3cb39934683de8cd475ce1368c8373453eb1e01f81587d66b9d14b109ce6e.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-48f33b77b7c1633467b0b2efcaa1d3c207e7757e4f1d83b40d15e6ca365f7771.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-4ae09f2c08e2f324bee01bb8487a8f37678a1c5e9d327339235c50d4921a8949.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-4d7a76fa413c9ef0ce2a47ac7bb7e01d3e6a2aabded9487d21010a53efee8852.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-4fcbdd6657c7dc9b60b3a563dd41711b3dbcf72ce063427b7a01f8cddf34c244.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-577109ac00ccfbd38ecaccab94116f2f46a4caf5612afa372cded197123c1e08.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-5db25f97d8578d6d78f2f6bd4b72cc82a9b1b82805c6422d967ac63b20d99db4.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-5ec3233a3a23e926055056d46bdde17836a633066dbb5f349502648cd3ea9a60.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-66edb6ea424d8681927dcddb6bac5f1239175f4775d1f40417ba15054b0c6f19.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-6f9c6d201c1b5712efb68c363bffd3e0169c11f2a8f925e8cd4e8808599ff7b4.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-733c3ebacc86f444bf5e2dd79ade660c291e88a00fc09b722f6e2e191545874c.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-7a3bf27c330c468a596e8a297cf7d8b192e31e67ecc5177c1267f579e8e247c7.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-7a7e59e47b30b12237511fd3d7da2d17b0471ad2b006af48d6a6f587c779692b.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-7dcbb33312cc9f11ae3a6d73b1ace017a9f19a8bf8f10304fc57977c8efeadff.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-7efa7c0d747afc4b6aed0586ff846c27839c3213ff7ee9f30c89b0d0f17e60e3.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-8493140d788604d498a4e48da4158708572ccc9d60185290a00d549cc84533db.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-8493bb0059b013eaca42fd10cd7d04f0d06a8acaed379eff0d23f3229edde9ee.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-87996b3d6c7a2195438d7038015b06949102bce8c7b8cd8db1f83aaf23cbe489.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-8d33717587c6ee8f5fc339a80b1212a73d6c03e45856b1d55457fc8074709dd0.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-8f096d8171b89f9615d18f95d696dc9e4fb3674e103161a713cdc806f7a68506.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-917732a56ee04bf3a6e127319dda8225210869c82f9828d878162394dba4e078.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-95fe4ef93ee90733db1b67ed7987f80b5aac792f1590b979c68b418d1599eb98.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-9b67658569b343d8b4b61ae0a7dc721f367f2ba33c7b69b9e68bfd5c9bff5206.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-9c8062ea55d070afef68309e58fa987eb37fda44e1efbf68c8ba2af7846cc968.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-a06e1d9f6f95e4c4c2b98310ebddcc9d963cc033582bf2e945e8bf3a301b4247.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-a55265c9b07bd1399961a6f1e757201fd0eebe868ddaf96437111113d80fce92.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-a60ec2f66f1e7b84189e5b089f2087a29ff6a64326a3743dea935bbc58ee77fa.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-a891a37be5c2d7cce775c2dd33726b0318fd3839beab222a1b22bc6174604207.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-a945191bb4b3e37d6823ed3ad499339d007d69983105de8567777d9daf517b28.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-abe9f7832f2bd799ac44008da031e8d8ab52d4f5fbfc2a7e3974e8873bae55b2.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-aca588cca57a85e4d7fcc40c23cd87e57d53d11ca550d78e7e3d5e39e524fcd3.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-b02f8aafc00a7724510772ac41269e368c5bccf03ef7b4590e0ef6fd1a1bf64f.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-b742e17cabe2d64617e9aa64bafc782172f7a4f8023d1b54f952a0fb39f6b2b8.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-b94e349dbc0daec57f8f8f6e9e2dffb06100b1bb2b41d297c9f3b191da37a83d.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-bd9afa22994aba671dbf7b5f89b53c2ee02f53c0442a81265786a6d52d08512f.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-be60554eca98a5899efc6b49785cecd6444a6d39afed9e4a884ce2dbf162012c.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-bf49702b506c9a1650ece1f8e8d9f14834a902f8caefafe30ded55e2790f2188.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-bfcd21ed704cd305db5c17fcdec7d92aa4ac501913c9c9514d8ff92928c0c7e7.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-c3ab694650f49a75b146fb877a92e48c4f20f0d99f70f8ec859fbb763b01a1e5.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-c55542bb9fae544d87fae6f30e0fe8a9088d12075f4442ab4fe2fcd05e472234.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-cb29a6556d35ac630ee0aa885dd7341cf9573bd3efd216ff8a887b87686b03db.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-d0a1f341a89f5f14696b10baa72db9d95551c2b7e5fc67308fd52dc03dd98a92.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-d2ad0a0ca2649c9e4873cfcc1fc66d2d07cc45d0f65c560b06d7b5f592f4fa8a.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-d6cfe78eb635ba0b89ca4021a4dc8182d18ab5b197f30149cd28488eba4c1df5.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-d729b56dea00e49dcdba8cf0001e2811da27351eabe98212db3b589f18fc6f32.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-d9658bfd4e7170b41d03f2ddf2446d0bf54171c0d39d53bf20af2b8437f2ec48.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-dbba7b3d3289425bae711aedbf73fbc3699f857f86f84d95c3b556d05c5658b0.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-dcb96b649d6d63a58efd5d445453a4f3d7869a56ff714b69bedf3d616a0473ca.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-ebd876fbf5362a5900e75bc05f2f11c73c406ef7da4e95097fc6a1c3d1b8bc54.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-eef5cc6bce1cc14eba8f3e68971724ef181e88cffcedd74673615f2026b89a62.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/.sqlx/query-ef56d5fefc5774040d1ee397beadb475f6af02768c22f0e583c74062e2e821ce.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/Cargo.lock +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/README.md +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/migrations/20241007163501_initial.sql +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/migrations/20241211120039_merge_job_priority.sql +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/migrations/20241211121159_basic_indexes.sql +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/migrations/20241212151105_check_segment_records.sql +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/migrations/20250110145554_in_flight_messages.sql +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_binding/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_binding/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/fuzzy_query.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/query_io.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/reader.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/request_types.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/resource_indexer.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/schema.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/search_query.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/search_response.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/set_query.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/src/stop_words.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/README.md +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/ar.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/az.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/bn.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/ca.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/ch.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/da.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/de.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/el.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/en.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/es.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/eu.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/extract.py +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/fi.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/fr.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/he.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/hu.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/id.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/it.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/kk.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/ne.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/nl.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/no.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/pt.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/ro.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/ru.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/sl.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/sv.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/tg.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/stop_words/tr.json +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/tests/common/mod.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_paragraph/tests/reader.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/build.py +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/build.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/nidx.proto +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/nodereader.proto +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/noderesources.proto +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/nodewriter.proto +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_protos/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/src/graph_collector.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/src/graph_query_parser.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/src/io_maps.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/src/reader.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/src/resource_indexer.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/src/schema.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/src/top_unique_n.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/tests/common/mod.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/tests/test_graph_query_parser_search.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/tests/test_graph_search.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_relation/tests/test_writer.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_tantivy/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_tantivy/src/index_reader.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_tantivy/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_tantivy/src/utils.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_tests/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_tests/src/graph.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_tests/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/src/prefilter.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/src/query_io.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/src/reader.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/src/request_types.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/src/resource_indexer.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/src/schema.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/src/search_query.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/tests/common/mod.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/tests/test_deletions.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/tests/test_flow.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/tests/test_search.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_text/tests/test_streaming.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_types/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_types/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_types/src/prefilter.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_types/src/query_language.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/Cargo.toml +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/config.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point/disk_hnsw.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point/params.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point/ram_hnsw.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point/tests.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point_provider/mod.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_types/trie.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_types/trie_ram.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/formula/mod.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/indexer.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/inverted_index/fst_index.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/inverted_index/map.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/query_io.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/request_types.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/utils.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/vector_types/dense_f32.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/vector_types/mod.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/tests/common/mod.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/tests/test_basic_search.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/tests/test_hidden.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/api/grpc.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/api/shards.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/api.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/control.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/errors.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/grpc_server.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/import_export.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/indexer.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/lib.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/main.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/metadata/deletion.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/metadata/index.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/metadata/index_request.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/metadata/merge_job.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/metadata/segment.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/metadata/shard.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/metadata.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/metrics.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/scheduler/audit_task.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/scheduler/log_merge.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/scheduler/merge_task.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/scheduler/metrics_task.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/scheduler/purge_tasks.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/scheduler/vector_merge.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/scheduler.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/grpc.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/index_cache.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/query_language.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/query_planner.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/shard_search.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/shard_selector.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/shard_suggest.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/streams.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher/sync.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/searcher.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/segment_store.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/settings.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/telemetry/duration_layer.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/telemetry/log_format.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/telemetry/middleware.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/telemetry.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/tool.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/utilization_tracker.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/src/worker.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/common/mod.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/common/services.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_date_range_search.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_search_filtering.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_search_relations.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_search_sorting.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_searcher_cluster.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_security_search.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_shards.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_shards_api.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_suggest.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_synced_searcher.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_vector_normalization.rs +0 -0
- {nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/tests/test_vectorsets.rs +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: nidx_binding
|
3
|
-
Version: 6.6.1.
|
3
|
+
Version: 6.6.1.post421
|
4
4
|
Classifier: Programming Language :: Rust
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
@@ -10,7 +10,7 @@ build-backend = "pdm.backend"
|
|
10
10
|
|
11
11
|
[project]
|
12
12
|
name = "nidx_protos"
|
13
|
-
version = "6.6.1.
|
13
|
+
version = "6.6.1.post421"
|
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" }]
|
@@ -19,7 +19,6 @@
|
|
19
19
|
//
|
20
20
|
|
21
21
|
pub mod disk_hnsw;
|
22
|
-
pub mod node;
|
23
22
|
pub mod ops_hnsw;
|
24
23
|
pub mod ram_hnsw;
|
25
24
|
|
@@ -27,8 +26,9 @@ mod params;
|
|
27
26
|
#[cfg(test)]
|
28
27
|
mod tests;
|
29
28
|
|
30
|
-
use crate::config::
|
31
|
-
use crate::
|
29
|
+
use crate::config::VectorConfig;
|
30
|
+
use crate::data_store::{DataStore, Node};
|
31
|
+
use crate::data_types::{trie, trie_ram};
|
32
32
|
use crate::formula::Formula;
|
33
33
|
use crate::inverted_index::{InvertedIndexes, build_indexes};
|
34
34
|
use crate::{VectorR, VectorSegmentMeta, VectorSegmentMetadata};
|
@@ -37,7 +37,6 @@ use bit_vec::BitVec;
|
|
37
37
|
use disk_hnsw::DiskHnsw;
|
38
38
|
use io::{BufWriter, Write};
|
39
39
|
use memmap2::Mmap;
|
40
|
-
use node::Node;
|
41
40
|
use ops_hnsw::{Cnx, HnswOps};
|
42
41
|
use ram_hnsw::RAMHnsw;
|
43
42
|
use std::cmp::Reverse;
|
@@ -53,36 +52,33 @@ pub use ops_hnsw::DataRetriever;
|
|
53
52
|
const HNSW_COST_FACTOR: usize = 200;
|
54
53
|
|
55
54
|
mod file_names {
|
56
|
-
pub const NODES: &str = "nodes.kv";
|
57
55
|
pub const HNSW: &str = "index.hnsw";
|
58
56
|
}
|
59
57
|
|
60
58
|
pub fn open(metadata: VectorSegmentMetadata) -> VectorR<OpenDataPoint> {
|
61
59
|
let path = &metadata.path;
|
62
|
-
let
|
60
|
+
let data_store = DataStore::open(path)?;
|
63
61
|
let hnsw_file = File::open(path.join(file_names::HNSW))?;
|
64
62
|
|
65
|
-
let nodes = unsafe { Mmap::map(&nodes_file)? };
|
66
63
|
let index = unsafe { Mmap::map(&hnsw_file)? };
|
67
64
|
|
68
65
|
// Telling the OS our expected access pattern
|
69
66
|
#[cfg(not(target_os = "windows"))]
|
70
67
|
{
|
71
|
-
nodes.advise(memmap2::Advice::WillNeed)?;
|
72
68
|
index.advise(memmap2::Advice::Sequential)?;
|
73
69
|
}
|
74
70
|
|
75
71
|
// Build the index at runtime if they do not exist. This can
|
76
72
|
// be removed once we have migrated all existing indexes
|
77
73
|
if !InvertedIndexes::exists(path) {
|
78
|
-
build_indexes(path, &
|
74
|
+
build_indexes(path, &data_store)?;
|
79
75
|
}
|
80
76
|
let inverted_indexes = InvertedIndexes::open(path, metadata.records)?;
|
81
77
|
let alive_bitset = BitSet::from_bit_vec(BitVec::from_elem(metadata.records, true));
|
82
78
|
|
83
79
|
Ok(OpenDataPoint {
|
84
80
|
metadata,
|
85
|
-
|
81
|
+
data_store,
|
86
82
|
index,
|
87
83
|
inverted_indexes,
|
88
84
|
alive_bitset,
|
@@ -90,13 +86,6 @@ pub fn open(metadata: VectorSegmentMetadata) -> VectorR<OpenDataPoint> {
|
|
90
86
|
}
|
91
87
|
|
92
88
|
pub fn merge(data_point_path: &Path, operants: &[&OpenDataPoint], config: &VectorConfig) -> VectorR<OpenDataPoint> {
|
93
|
-
let nodes_path = data_point_path.join(file_names::NODES);
|
94
|
-
let mut nodes_file = File::options()
|
95
|
-
.read(true)
|
96
|
-
.write(true)
|
97
|
-
.create_new(true)
|
98
|
-
.open(nodes_path)?;
|
99
|
-
|
100
89
|
let hnsw_path = data_point_path.join(file_names::HNSW);
|
101
90
|
let mut hnsw_file = File::options()
|
102
91
|
.read(true)
|
@@ -117,10 +106,10 @@ pub fn merge(data_point_path: &Path, operants: &[&OpenDataPoint], config: &Vecto
|
|
117
106
|
}
|
118
107
|
|
119
108
|
// Creating the node store
|
120
|
-
let mut node_producers: Vec<_> = operants.iter().map(|dp| (dp.alive_nodes(), &dp.
|
121
|
-
let has_deletions =
|
122
|
-
let
|
123
|
-
let no_nodes = data_store
|
109
|
+
let mut node_producers: Vec<_> = operants.iter().map(|dp| (dp.alive_nodes(), &dp.data_store)).collect();
|
110
|
+
let has_deletions = DataStore::merge(data_point_path, node_producers.as_mut_slice(), config)?;
|
111
|
+
let data_store = DataStore::open(data_point_path)?;
|
112
|
+
let no_nodes = data_store.stored_elements();
|
124
113
|
|
125
114
|
let mut index;
|
126
115
|
let start_node_index;
|
@@ -131,12 +120,12 @@ pub fn merge(data_point_path: &Path, operants: &[&OpenDataPoint], config: &Vecto
|
|
131
120
|
// If there are no deletions, we can reuse the first segment
|
132
121
|
// HNSW since its indexes will match the the ones in data_store
|
133
122
|
index = DiskHnsw::deserialize(&operants[0].index);
|
134
|
-
start_node_index =
|
123
|
+
start_node_index = operants[0].data_store.stored_elements();
|
135
124
|
}
|
136
125
|
|
137
126
|
// Creating the hnsw for the new node store.
|
138
|
-
let
|
139
|
-
let mut ops = HnswOps::new(&
|
127
|
+
let retriever = Retriever::new(&[], &data_store, config, -1.0);
|
128
|
+
let mut ops = HnswOps::new(&retriever, false);
|
140
129
|
for id in start_node_index..no_nodes {
|
141
130
|
ops.insert(Address(id), &mut index);
|
142
131
|
}
|
@@ -152,11 +141,10 @@ pub fn merge(data_point_path: &Path, operants: &[&OpenDataPoint], config: &Vecto
|
|
152
141
|
// Telling the OS our expected access pattern
|
153
142
|
#[cfg(not(target_os = "windows"))]
|
154
143
|
{
|
155
|
-
nodes.advise(memmap2::Advice::WillNeed)?;
|
156
144
|
index.advise(memmap2::Advice::Sequential)?;
|
157
145
|
}
|
158
146
|
|
159
|
-
build_indexes(data_point_path, &
|
147
|
+
build_indexes(data_point_path, &data_store)?;
|
160
148
|
|
161
149
|
let metadata = VectorSegmentMetadata {
|
162
150
|
path: data_point_path.to_path_buf(),
|
@@ -164,13 +152,13 @@ pub fn merge(data_point_path: &Path, operants: &[&OpenDataPoint], config: &Vecto
|
|
164
152
|
index_metadata: VectorSegmentMeta { tags: tags.clone() },
|
165
153
|
};
|
166
154
|
|
167
|
-
build_indexes(data_point_path, &
|
155
|
+
build_indexes(data_point_path, &data_store)?;
|
168
156
|
let inverted_indexes = InvertedIndexes::open(data_point_path, no_nodes)?;
|
169
157
|
let alive_bitset = BitSet::from_bit_vec(BitVec::from_elem(metadata.records, true));
|
170
158
|
|
171
159
|
Ok(OpenDataPoint {
|
172
160
|
metadata,
|
173
|
-
|
161
|
+
data_store,
|
174
162
|
index,
|
175
163
|
inverted_indexes,
|
176
164
|
alive_bitset,
|
@@ -188,12 +176,6 @@ pub fn create(path: &Path, elems: Vec<Elem>, config: &VectorConfig, tags: HashSe
|
|
188
176
|
}
|
189
177
|
}
|
190
178
|
|
191
|
-
let mut nodes_file = File::options()
|
192
|
-
.read(true)
|
193
|
-
.write(true)
|
194
|
-
.create_new(true)
|
195
|
-
.open(path.join(file_names::NODES))?;
|
196
|
-
|
197
179
|
let mut hnsw_file = File::options()
|
198
180
|
.read(true)
|
199
181
|
.write(true)
|
@@ -202,14 +184,14 @@ pub fn create(path: &Path, elems: Vec<Elem>, config: &VectorConfig, tags: HashSe
|
|
202
184
|
|
203
185
|
// Serializing nodes on disk
|
204
186
|
// Nodes are stored on disk and mmaped.
|
205
|
-
|
206
|
-
let
|
207
|
-
let no_nodes = data_store
|
187
|
+
DataStore::create(path, elems, &config.vector_type)?;
|
188
|
+
let data_store = DataStore::open(path)?;
|
189
|
+
let no_nodes = data_store.stored_elements();
|
208
190
|
|
209
191
|
// Creating the HNSW using the mmaped nodes
|
210
192
|
let mut index = RAMHnsw::new();
|
211
|
-
let
|
212
|
-
let mut ops = HnswOps::new(&
|
193
|
+
let retriever = Retriever::new(&[], &data_store, config, -1.0);
|
194
|
+
let mut ops = HnswOps::new(&retriever, false);
|
213
195
|
for id in 0..no_nodes {
|
214
196
|
ops.insert(Address(id), &mut index)
|
215
197
|
}
|
@@ -226,11 +208,10 @@ pub fn create(path: &Path, elems: Vec<Elem>, config: &VectorConfig, tags: HashSe
|
|
226
208
|
// Telling the OS our expected access pattern
|
227
209
|
#[cfg(not(target_os = "windows"))]
|
228
210
|
{
|
229
|
-
nodes.advise(memmap2::Advice::WillNeed)?;
|
230
211
|
index.advise(memmap2::Advice::Sequential)?;
|
231
212
|
}
|
232
213
|
|
233
|
-
build_indexes(path, &
|
214
|
+
build_indexes(path, &data_store)?;
|
234
215
|
|
235
216
|
let metadata = VectorSegmentMetadata {
|
236
217
|
path: path.to_path_buf(),
|
@@ -238,13 +219,13 @@ pub fn create(path: &Path, elems: Vec<Elem>, config: &VectorConfig, tags: HashSe
|
|
238
219
|
index_metadata: VectorSegmentMeta { tags },
|
239
220
|
};
|
240
221
|
|
241
|
-
build_indexes(path, &
|
222
|
+
build_indexes(path, &data_store)?;
|
242
223
|
let inverted_indexes = InvertedIndexes::open(path, no_nodes)?;
|
243
224
|
let alive_bitset = BitSet::from_bit_vec(BitVec::from_elem(metadata.records, true));
|
244
225
|
|
245
226
|
Ok(OpenDataPoint {
|
246
227
|
metadata,
|
247
|
-
|
228
|
+
data_store,
|
248
229
|
index,
|
249
230
|
inverted_indexes,
|
250
231
|
alive_bitset,
|
@@ -258,59 +239,50 @@ pub struct Retriever<'a> {
|
|
258
239
|
similarity_function: fn(&[u8], &[u8]) -> f32,
|
259
240
|
no_nodes: usize,
|
260
241
|
temp: &'a [u8],
|
261
|
-
|
242
|
+
data_store: &'a DataStore,
|
262
243
|
min_score: f32,
|
263
244
|
vector_len_bytes: usize,
|
264
245
|
}
|
265
246
|
impl<'a> Retriever<'a> {
|
266
|
-
pub fn new(temp: &'a [u8],
|
267
|
-
let no_nodes = data_store
|
247
|
+
pub fn new(temp: &'a [u8], data_store: &'a DataStore, config: &VectorConfig, min_score: f32) -> Retriever<'a> {
|
248
|
+
let no_nodes = data_store.stored_elements();
|
268
249
|
let vector_len_bytes = config.vector_len_bytes();
|
269
250
|
Retriever {
|
270
251
|
temp,
|
271
|
-
|
252
|
+
data_store,
|
272
253
|
similarity_function: config.similarity_function(),
|
273
254
|
no_nodes,
|
274
255
|
min_score,
|
275
256
|
vector_len_bytes,
|
276
257
|
}
|
277
258
|
}
|
278
|
-
fn find_node(&self, Address(x): Address) ->
|
279
|
-
|
280
|
-
self.temp
|
281
|
-
} else {
|
282
|
-
data_store::get_value(self.nodes, x)
|
283
|
-
}
|
259
|
+
fn find_node(&'a self, Address(x): Address) -> Node<'a> {
|
260
|
+
self.data_store.get_value(x)
|
284
261
|
}
|
285
262
|
}
|
286
263
|
|
287
264
|
impl DataRetriever for Retriever<'_> {
|
288
265
|
fn will_need(&self, Address(x): Address) {
|
289
|
-
data_store
|
266
|
+
self.data_store.will_need(x, self.vector_len_bytes);
|
290
267
|
}
|
291
268
|
|
292
269
|
fn get_vector(&self, x @ Address(addr): Address) -> &[u8] {
|
293
270
|
if addr == self.no_nodes {
|
294
271
|
self.temp
|
295
272
|
} else {
|
296
|
-
|
297
|
-
Node::vector(x)
|
273
|
+
self.find_node(x).vector()
|
298
274
|
}
|
299
275
|
}
|
300
276
|
fn similarity(&self, x @ Address(a0): Address, y @ Address(a1): Address) -> f32 {
|
301
277
|
if a0 == self.no_nodes {
|
302
|
-
let y = self.find_node(y);
|
303
|
-
let y = Node::vector(y);
|
278
|
+
let y = self.find_node(y).vector();
|
304
279
|
(self.similarity_function)(self.temp, y)
|
305
280
|
} else if a1 == self.no_nodes {
|
306
|
-
let x = self.find_node(x);
|
307
|
-
let x = Node::vector(x);
|
281
|
+
let x = self.find_node(x).vector();
|
308
282
|
(self.similarity_function)(self.temp, x)
|
309
283
|
} else {
|
310
|
-
let x = self.find_node(x);
|
311
|
-
let y = self.find_node(y);
|
312
|
-
let x = Node::vector(x);
|
313
|
-
let y = Node::vector(y);
|
284
|
+
let x = self.find_node(x).vector();
|
285
|
+
let y = self.find_node(y).vector();
|
314
286
|
(self.similarity_function)(x, y)
|
315
287
|
}
|
316
288
|
}
|
@@ -321,7 +293,7 @@ impl DataRetriever for Retriever<'_> {
|
|
321
293
|
}
|
322
294
|
|
323
295
|
#[derive(Clone, Debug)]
|
324
|
-
pub struct LabelDictionary(Vec<u8>);
|
296
|
+
pub struct LabelDictionary(pub Vec<u8>);
|
325
297
|
impl Default for LabelDictionary {
|
326
298
|
fn default() -> Self {
|
327
299
|
LabelDictionary::new(vec![])
|
@@ -352,60 +324,52 @@ impl Elem {
|
|
352
324
|
}
|
353
325
|
}
|
354
326
|
|
355
|
-
impl data_store::IntoBuffer for Elem {
|
356
|
-
fn serialize_into<W: io::Write>(self, w: W, vector_type: &VectorType) -> io::Result<()> {
|
357
|
-
Node::serialize_into(
|
358
|
-
w,
|
359
|
-
self.key,
|
360
|
-
vector_type.encode(&self.vector),
|
361
|
-
vector_type.vector_alignment(),
|
362
|
-
self.labels.0,
|
363
|
-
self.metadata.as_ref(),
|
364
|
-
)
|
365
|
-
}
|
366
|
-
}
|
367
|
-
|
368
327
|
#[derive(Debug, Clone)]
|
369
|
-
pub struct Neighbour {
|
328
|
+
pub struct Neighbour<'a> {
|
370
329
|
score: f32,
|
371
|
-
node:
|
330
|
+
node: Node<'a>,
|
372
331
|
}
|
373
|
-
impl Eq for Neighbour {}
|
374
|
-
impl std::hash::Hash for Neighbour {
|
332
|
+
impl Eq for Neighbour<'_> {}
|
333
|
+
impl std::hash::Hash for Neighbour<'_> {
|
375
334
|
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
|
376
335
|
self.id().hash(state)
|
377
336
|
}
|
337
|
+
|
338
|
+
fn hash_slice<H: std::hash::Hasher>(data: &[Self], state: &mut H)
|
339
|
+
where
|
340
|
+
Self: Sized,
|
341
|
+
{
|
342
|
+
for piece in data {
|
343
|
+
piece.hash(state)
|
344
|
+
}
|
345
|
+
}
|
378
346
|
}
|
379
|
-
impl Ord for Neighbour {
|
347
|
+
impl Ord for Neighbour<'_> {
|
380
348
|
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
|
381
349
|
self.node.cmp(&other.node)
|
382
350
|
}
|
383
351
|
}
|
384
|
-
impl PartialOrd for Neighbour {
|
352
|
+
impl PartialOrd for Neighbour<'_> {
|
385
353
|
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
386
354
|
Some(self.cmp(other))
|
387
355
|
}
|
388
356
|
}
|
389
|
-
impl PartialEq for Neighbour {
|
357
|
+
impl PartialEq for Neighbour<'_> {
|
390
358
|
fn eq(&self, other: &Self) -> bool {
|
391
359
|
self.node == other.node
|
392
360
|
}
|
393
361
|
}
|
394
362
|
|
395
|
-
impl Neighbour {
|
396
|
-
fn new(Address(addr): Address,
|
397
|
-
let node = data_store
|
398
|
-
|
399
|
-
Neighbour {
|
400
|
-
score,
|
401
|
-
node: exact.to_vec(),
|
402
|
-
}
|
363
|
+
impl Neighbour<'_> {
|
364
|
+
fn new(Address(addr): Address, data_store: &DataStore, score: f32) -> Neighbour {
|
365
|
+
let node = data_store.get_value(addr);
|
366
|
+
Neighbour { score, node }
|
403
367
|
}
|
404
368
|
pub fn score(&self) -> f32 {
|
405
369
|
self.score
|
406
370
|
}
|
407
371
|
pub fn id(&self) -> &[u8] {
|
408
|
-
Node
|
372
|
+
Node::key(&self.node)
|
409
373
|
}
|
410
374
|
pub fn vector(&self) -> &[u8] {
|
411
375
|
Node::vector(&self.node)
|
@@ -421,7 +385,7 @@ impl Neighbour {
|
|
421
385
|
|
422
386
|
pub struct OpenDataPoint {
|
423
387
|
metadata: VectorSegmentMetadata,
|
424
|
-
|
388
|
+
data_store: DataStore,
|
425
389
|
index: Mmap,
|
426
390
|
inverted_indexes: InvertedIndexes,
|
427
391
|
alive_bitset: BitSet,
|
@@ -455,7 +419,7 @@ impl OpenDataPoint {
|
|
455
419
|
}
|
456
420
|
|
457
421
|
pub fn space_usage(&self) -> usize {
|
458
|
-
self.
|
422
|
+
self.data_store.size_bytes() + self.index.len() + self.inverted_indexes.space_usage()
|
459
423
|
}
|
460
424
|
|
461
425
|
pub fn search(
|
@@ -468,7 +432,7 @@ impl OpenDataPoint {
|
|
468
432
|
min_score: f32,
|
469
433
|
) -> Box<dyn Iterator<Item = Neighbour> + '_> {
|
470
434
|
let encoded_query = config.vector_type.encode(query);
|
471
|
-
let
|
435
|
+
let retriever = Retriever::new(&encoded_query, &self.data_store, config, min_score);
|
472
436
|
let query_address = Address(self.metadata.records);
|
473
437
|
|
474
438
|
let mut filter_bitset = self.inverted_indexes.filter(filter);
|
@@ -488,7 +452,7 @@ impl OpenDataPoint {
|
|
488
452
|
let mut scored_results = Vec::new();
|
489
453
|
for address in bitset.iter() {
|
490
454
|
let address = Address(address);
|
491
|
-
let score =
|
455
|
+
let score = retriever.similarity(query_address, address);
|
492
456
|
if score >= min_score {
|
493
457
|
scored_results.push(Reverse(Cnx(address, score)));
|
494
458
|
}
|
@@ -497,17 +461,17 @@ impl OpenDataPoint {
|
|
497
461
|
return Box::new(
|
498
462
|
scored_results
|
499
463
|
.into_iter()
|
500
|
-
.map(|Reverse(a)| Neighbour::new(a.0, &self.
|
464
|
+
.map(|Reverse(a)| Neighbour::new(a.0, &self.data_store, a.1))
|
501
465
|
.take(results),
|
502
466
|
);
|
503
467
|
}
|
504
468
|
|
505
|
-
let ops = HnswOps::new(&
|
469
|
+
let ops = HnswOps::new(&retriever, true);
|
506
470
|
let neighbours = ops.search(query_address, self.index.as_ref(), results, bitset, with_duplicates);
|
507
471
|
Box::new(
|
508
472
|
neighbours
|
509
473
|
.into_iter()
|
510
|
-
.map(|(address, dist)| (Neighbour::new(address, &self.
|
474
|
+
.map(|(address, dist)| (Neighbour::new(address, &self.data_store, dist)))
|
511
475
|
.take(results),
|
512
476
|
)
|
513
477
|
}
|
@@ -523,12 +487,11 @@ mod test {
|
|
523
487
|
|
524
488
|
use crate::{
|
525
489
|
config::{Similarity, VectorConfig},
|
526
|
-
data_types::data_store,
|
527
490
|
formula::Formula,
|
528
491
|
vector_types::dense_f32::{dot_similarity, encode_vector},
|
529
492
|
};
|
530
493
|
|
531
|
-
use super::{Elem, LabelDictionary, create, merge
|
494
|
+
use super::{Elem, LabelDictionary, create, merge};
|
532
495
|
use nidx_protos::prost::*;
|
533
496
|
|
534
497
|
const DIMENSION: usize = 128;
|
@@ -619,23 +582,22 @@ mod test {
|
|
619
582
|
&config,
|
620
583
|
HashSet::new(),
|
621
584
|
)?;
|
622
|
-
let nodes = dp.nodes;
|
623
585
|
|
624
586
|
for (i, (elem, mut labels)) in elems.into_iter().enumerate() {
|
625
|
-
let node = data_store
|
626
|
-
assert_eq!(elem.key,
|
627
|
-
assert_eq!(config.vector_type.encode(&elem.vector),
|
587
|
+
let node = dp.data_store.get_value(i);
|
588
|
+
assert_eq!(elem.key, node.key());
|
589
|
+
assert_eq!(config.vector_type.encode(&elem.vector), node.vector());
|
628
590
|
|
629
591
|
// Compare metadata as the decoded protobug. Tthe absolute stored value may have trailing padding
|
630
592
|
// from vectors, but the decoding step should ignore it
|
631
593
|
assert_eq!(
|
632
594
|
SentenceMetadata::decode(elem.metadata.as_ref().unwrap().as_slice()),
|
633
|
-
SentenceMetadata::decode(
|
595
|
+
SentenceMetadata::decode(node.metadata())
|
634
596
|
);
|
635
597
|
|
636
598
|
// Compare labels
|
637
599
|
labels.sort();
|
638
|
-
let mut node_labels =
|
600
|
+
let mut node_labels = node.labels();
|
639
601
|
node_labels.sort();
|
640
602
|
assert_eq!(labels, node_labels);
|
641
603
|
}
|
@@ -673,23 +635,22 @@ mod test {
|
|
673
635
|
|
674
636
|
let path_merged = tempdir()?;
|
675
637
|
let merged_dp = merge(path_merged.path(), &[&dp1, &dp2], &config)?;
|
676
|
-
let nodes = merged_dp.nodes;
|
677
638
|
|
678
639
|
for (i, (elem, mut labels)) in elems1.into_iter().chain(elems2.into_iter()).enumerate() {
|
679
|
-
let node = data_store
|
680
|
-
assert_eq!(elem.key,
|
681
|
-
assert_eq!(config.vector_type.encode(&elem.vector),
|
640
|
+
let node = merged_dp.data_store.get_value(i);
|
641
|
+
assert_eq!(elem.key, node.key());
|
642
|
+
assert_eq!(config.vector_type.encode(&elem.vector), node.vector());
|
682
643
|
|
683
644
|
// Compare metadata as the decoded protobug. Tthe absolute stored value may have trailing padding
|
684
645
|
// from vectors, but the decoding step should ignore it
|
685
646
|
assert_eq!(
|
686
647
|
SentenceMetadata::decode(elem.metadata.as_ref().unwrap().as_slice()),
|
687
|
-
SentenceMetadata::decode(
|
648
|
+
SentenceMetadata::decode(node.metadata())
|
688
649
|
);
|
689
650
|
|
690
651
|
// Compare labels
|
691
652
|
labels.sort();
|
692
|
-
let mut node_labels =
|
653
|
+
let mut node_labels = node.labels();
|
693
654
|
node_labels.sort();
|
694
655
|
assert_eq!(labels, node_labels);
|
695
656
|
}
|
{nidx_binding-6.6.1.post415 → nidx_binding-6.6.1.post421}/nidx_vector/src/data_point/ops_hnsw.rs
RENAMED
@@ -79,7 +79,7 @@ pub type Neighbours = Vec<(Address, f32)>;
|
|
79
79
|
|
80
80
|
/// Guides an algorithm to the valid nodes.
|
81
81
|
struct NodeFilter<'a, DR> {
|
82
|
-
|
82
|
+
retriever: &'a DR,
|
83
83
|
filter: &'a BitSet,
|
84
84
|
blocked_addresses: &'a FxHashSet<Address>,
|
85
85
|
vec_counter: RepCounter<'a>,
|
@@ -95,14 +95,14 @@ impl<DR: DataRetriever> NodeFilter<'_, DR> {
|
|
95
95
|
// The vector is blocked, meaning that its key is part of the current version of the solution
|
96
96
|
&& !self.blocked_addresses.contains(&n)
|
97
97
|
// The number of times this vector appears is 0
|
98
|
-
&& self.vec_counter.get(self.
|
98
|
+
&& self.vec_counter.get(self.retriever.get_vector(n)) == 0
|
99
99
|
}
|
100
100
|
}
|
101
101
|
|
102
102
|
pub struct HnswOps<'a, DR> {
|
103
103
|
distribution: Uniform<f64>,
|
104
104
|
layer_rng: SmallRng,
|
105
|
-
|
105
|
+
retriever: &'a DR,
|
106
106
|
preload_nodes: bool,
|
107
107
|
}
|
108
108
|
|
@@ -153,7 +153,7 @@ impl<'a, DR: DataRetriever> HnswOps<'a, DR> {
|
|
153
153
|
results
|
154
154
|
}
|
155
155
|
fn similarity(&self, x: Address, y: Address) -> f32 {
|
156
|
-
self.
|
156
|
+
self.retriever.similarity(x, y)
|
157
157
|
}
|
158
158
|
fn get_random_layer(&mut self) -> usize {
|
159
159
|
let sample: f64 = self.layer_rng.sample(self.distribution);
|
@@ -187,12 +187,12 @@ impl<'a, DR: DataRetriever> HnswOps<'a, DR> {
|
|
187
187
|
|
188
188
|
let candidate_similarity = self.similarity(query, candidate);
|
189
189
|
|
190
|
-
if candidate_similarity < self.
|
190
|
+
if candidate_similarity < self.retriever.min_score() {
|
191
191
|
break;
|
192
192
|
}
|
193
193
|
|
194
194
|
if filter.is_valid(candidate, candidate_similarity) && filter.passes_formula(candidate) {
|
195
|
-
let candidate_vector = self.
|
195
|
+
let candidate_vector = self.retriever.get_vector(candidate);
|
196
196
|
filter.vec_counter.add(candidate_vector);
|
197
197
|
results.push((candidate, candidate_similarity));
|
198
198
|
}
|
@@ -209,7 +209,7 @@ impl<'a, DR: DataRetriever> HnswOps<'a, DR> {
|
|
209
209
|
candidates.push_back(new_candidate);
|
210
210
|
|
211
211
|
if self.preload_nodes && preloaded < MAX_VECTORS_TO_PRELOAD {
|
212
|
-
self.
|
212
|
+
self.retriever.will_need(new_candidate);
|
213
213
|
preloaded += 1;
|
214
214
|
}
|
215
215
|
}
|
@@ -241,7 +241,7 @@ impl<'a, DR: DataRetriever> HnswOps<'a, DR> {
|
|
241
241
|
(Some(Cnx(cn, _)), Some(Reverse(Cnx(_, mut ws)))) => {
|
242
242
|
for (y, _) in layer.get_out_edges(cn) {
|
243
243
|
if self.preload_nodes && !visited.contains(&y) {
|
244
|
-
self.
|
244
|
+
self.retriever.will_need(y);
|
245
245
|
}
|
246
246
|
}
|
247
247
|
for (y, _) in layer.get_out_edges(cn) {
|
@@ -351,7 +351,7 @@ impl<'a, DR: DataRetriever> HnswOps<'a, DR> {
|
|
351
351
|
|
352
352
|
let filter = NodeFilter {
|
353
353
|
filter: with_filter,
|
354
|
-
|
354
|
+
retriever: self.retriever,
|
355
355
|
blocked_addresses: &Default::default(),
|
356
356
|
vec_counter: RepCounter::new(!with_duplicates),
|
357
357
|
};
|
@@ -364,9 +364,9 @@ impl<'a, DR: DataRetriever> HnswOps<'a, DR> {
|
|
364
364
|
filtered_result
|
365
365
|
}
|
366
366
|
|
367
|
-
pub fn new(
|
367
|
+
pub fn new(retriever: &DR, preload_nodes: bool) -> HnswOps<'_, DR> {
|
368
368
|
HnswOps {
|
369
|
-
|
369
|
+
retriever,
|
370
370
|
distribution: Uniform::new(0.0, 1.0),
|
371
371
|
layer_rng: SmallRng::seed_from_u64(2),
|
372
372
|
preload_nodes,
|
@@ -36,24 +36,24 @@ use std::time::Instant;
|
|
36
36
|
use tracing::*;
|
37
37
|
|
38
38
|
// Fixed-sized sorted collection
|
39
|
-
struct Fssc {
|
39
|
+
struct Fssc<'a> {
|
40
40
|
size: usize,
|
41
41
|
with_duplicates: bool,
|
42
42
|
seen: HashSet<Vec<u8>>,
|
43
|
-
buff: HashMap<Neighbour
|
43
|
+
buff: HashMap<Neighbour<'a>, f32>,
|
44
44
|
}
|
45
|
-
impl From<Fssc
|
46
|
-
fn from(fssv: Fssc) -> Self {
|
45
|
+
impl<'a> From<Fssc<'a>> for Vec<Neighbour<'a>> {
|
46
|
+
fn from(fssv: Fssc<'a>) -> Self {
|
47
47
|
let mut result: Vec<_> = fssv.buff.into_keys().collect();
|
48
48
|
result.sort_by(|a, b| b.score().partial_cmp(&a.score()).unwrap_or(Ordering::Less));
|
49
49
|
result
|
50
50
|
}
|
51
51
|
}
|
52
|
-
impl Fssc {
|
52
|
+
impl<'a> Fssc<'a> {
|
53
53
|
fn is_full(&self) -> bool {
|
54
54
|
self.buff.len() == self.size
|
55
55
|
}
|
56
|
-
fn new(size: usize, with_duplicates: bool) -> Fssc {
|
56
|
+
fn new(size: usize, with_duplicates: bool) -> Fssc<'a> {
|
57
57
|
Fssc {
|
58
58
|
size,
|
59
59
|
with_duplicates,
|
@@ -61,7 +61,7 @@ impl Fssc {
|
|
61
61
|
buff: HashMap::with_capacity(size),
|
62
62
|
}
|
63
63
|
}
|
64
|
-
fn add(&mut self, candidate: Neighbour) {
|
64
|
+
fn add(&mut self, candidate: Neighbour<'a>) {
|
65
65
|
if !self.with_duplicates && self.seen.contains(candidate.vector()) {
|
66
66
|
return;
|
67
67
|
} else if !self.with_duplicates {
|
@@ -126,7 +126,7 @@ impl SearchRequest for (usize, &VectorSearchRequest, Formula) {
|
|
126
126
|
}
|
127
127
|
}
|
128
128
|
|
129
|
-
impl TryFrom<Neighbour
|
129
|
+
impl TryFrom<Neighbour<'_>> for DocumentScored {
|
130
130
|
type Error = String;
|
131
131
|
fn try_from(neighbour: Neighbour) -> Result<Self, Self::Error> {
|
132
132
|
let id = std::str::from_utf8(neighbour.id());
|