nidx-binding 6.3.4.post148__tar.gz → 6.3.4.post159__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.3.4.post148 → nidx_binding-6.3.4.post159}/PKG-INFO +1 -1
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/tests/reader.rs +0 -1
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_protos/pyproject.toml +1 -1
- nidx_binding-6.3.4.post159/nidx_relation/src/graph_collector.rs +177 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/src/graph_query_parser.rs +49 -69
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/src/io_maps.rs +7 -14
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/src/lib.rs +37 -37
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/src/reader.rs +59 -156
- nidx_binding-6.3.4.post159/nidx_relation/src/resource_indexer.rs +102 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/src/schema.rs +24 -49
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/tests/common/mod.rs +0 -1
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/tests/test_graph_search.rs +146 -2
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/tests/test_reader.rs +34 -36
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_tests/src/graph.rs +0 -1
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/tests/common/mod.rs +0 -1
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/pyproject.toml +1 -1
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_search_relations.rs +2 -2
- nidx_binding-6.3.4.post148/nidx_relation/src/graph_collector.rs +0 -373
- nidx_binding-6.3.4.post148/nidx_relation/src/resource_indexer.rs +0 -130
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-0cfce9b29547f8f5bafa6e440f86103be7b8c4ad2fd92db9ac223f4efbe23d10.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-1a561eed00f3dbe868bf5030059793300209179dc8fb73e4b57a54b5e81262fe.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-1d3fca2682e25a01143da92285297f134a6a105a96f64d87e0db3abb219855e4.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-249b3b57c27a71baa823f1fe0f0bba9c9af36f61c28f731e58beea60ec48e687.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-24cb6b683daa42d7125f862e25943ab4be7bf275cd8739f8da4859d701795e1a.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-263c8fce6db5b03bbd012fafdba6943cbee6ed7eb8976cdef4f5b01dde7ca6fd.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-2a5d92fb1638df830a4477a7cdf24e6db6b43034b7bbe74fdfb63e8afe2c4071.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-2b065a363f58caed60e3706603c1260dbf5a4c795604a5b68edda22eb07fec1b.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-3fc3cb39934683de8cd475ce1368c8373453eb1e01f81587d66b9d14b109ce6e.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-48f33b77b7c1633467b0b2efcaa1d3c207e7757e4f1d83b40d15e6ca365f7771.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-4ae09f2c08e2f324bee01bb8487a8f37678a1c5e9d327339235c50d4921a8949.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-4d7a76fa413c9ef0ce2a47ac7bb7e01d3e6a2aabded9487d21010a53efee8852.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-4fcbdd6657c7dc9b60b3a563dd41711b3dbcf72ce063427b7a01f8cddf34c244.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-577109ac00ccfbd38ecaccab94116f2f46a4caf5612afa372cded197123c1e08.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-5db25f97d8578d6d78f2f6bd4b72cc82a9b1b82805c6422d967ac63b20d99db4.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-5ec3233a3a23e926055056d46bdde17836a633066dbb5f349502648cd3ea9a60.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-66edb6ea424d8681927dcddb6bac5f1239175f4775d1f40417ba15054b0c6f19.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-6f9c6d201c1b5712efb68c363bffd3e0169c11f2a8f925e8cd4e8808599ff7b4.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-733c3ebacc86f444bf5e2dd79ade660c291e88a00fc09b722f6e2e191545874c.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-77a245aed9f6f8b9fc643efbd4b1e2e8e99bbba085e3e75a4f29321cd7b2a25c.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-7a3bf27c330c468a596e8a297cf7d8b192e31e67ecc5177c1267f579e8e247c7.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-7a7e59e47b30b12237511fd3d7da2d17b0471ad2b006af48d6a6f587c779692b.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-7dcbb33312cc9f11ae3a6d73b1ace017a9f19a8bf8f10304fc57977c8efeadff.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-7efa7c0d747afc4b6aed0586ff846c27839c3213ff7ee9f30c89b0d0f17e60e3.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-8493140d788604d498a4e48da4158708572ccc9d60185290a00d549cc84533db.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-8493bb0059b013eaca42fd10cd7d04f0d06a8acaed379eff0d23f3229edde9ee.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-87996b3d6c7a2195438d7038015b06949102bce8c7b8cd8db1f83aaf23cbe489.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-8f096d8171b89f9615d18f95d696dc9e4fb3674e103161a713cdc806f7a68506.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-917732a56ee04bf3a6e127319dda8225210869c82f9828d878162394dba4e078.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-95fe4ef93ee90733db1b67ed7987f80b5aac792f1590b979c68b418d1599eb98.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-9b67658569b343d8b4b61ae0a7dc721f367f2ba33c7b69b9e68bfd5c9bff5206.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-9c8062ea55d070afef68309e58fa987eb37fda44e1efbf68c8ba2af7846cc968.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-a06e1d9f6f95e4c4c2b98310ebddcc9d963cc033582bf2e945e8bf3a301b4247.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-a55265c9b07bd1399961a6f1e757201fd0eebe868ddaf96437111113d80fce92.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-a891a37be5c2d7cce775c2dd33726b0318fd3839beab222a1b22bc6174604207.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-a945191bb4b3e37d6823ed3ad499339d007d69983105de8567777d9daf517b28.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-abe9f7832f2bd799ac44008da031e8d8ab52d4f5fbfc2a7e3974e8873bae55b2.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-aca588cca57a85e4d7fcc40c23cd87e57d53d11ca550d78e7e3d5e39e524fcd3.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-b02f8aafc00a7724510772ac41269e368c5bccf03ef7b4590e0ef6fd1a1bf64f.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-b742e17cabe2d64617e9aa64bafc782172f7a4f8023d1b54f952a0fb39f6b2b8.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-b94e349dbc0daec57f8f8f6e9e2dffb06100b1bb2b41d297c9f3b191da37a83d.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-bd9afa22994aba671dbf7b5f89b53c2ee02f53c0442a81265786a6d52d08512f.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-be60554eca98a5899efc6b49785cecd6444a6d39afed9e4a884ce2dbf162012c.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-bf49702b506c9a1650ece1f8e8d9f14834a902f8caefafe30ded55e2790f2188.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-bfb8ae2e860e451b0868a7b1b50a451d998b2105f9fdfd307b26a1775d145e9f.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-bfcd21ed704cd305db5c17fcdec7d92aa4ac501913c9c9514d8ff92928c0c7e7.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-c3ab694650f49a75b146fb877a92e48c4f20f0d99f70f8ec859fbb763b01a1e5.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-c55542bb9fae544d87fae6f30e0fe8a9088d12075f4442ab4fe2fcd05e472234.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-cb29a6556d35ac630ee0aa885dd7341cf9573bd3efd216ff8a887b87686b03db.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-d0a1f341a89f5f14696b10baa72db9d95551c2b7e5fc67308fd52dc03dd98a92.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-d2ad0a0ca2649c9e4873cfcc1fc66d2d07cc45d0f65c560b06d7b5f592f4fa8a.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-d6cfe78eb635ba0b89ca4021a4dc8182d18ab5b197f30149cd28488eba4c1df5.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-d729b56dea00e49dcdba8cf0001e2811da27351eabe98212db3b589f18fc6f32.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-d9658bfd4e7170b41d03f2ddf2446d0bf54171c0d39d53bf20af2b8437f2ec48.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-dbba7b3d3289425bae711aedbf73fbc3699f857f86f84d95c3b556d05c5658b0.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-dcb96b649d6d63a58efd5d445453a4f3d7869a56ff714b69bedf3d616a0473ca.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-ebd876fbf5362a5900e75bc05f2f11c73c406ef7da4e95097fc6a1c3d1b8bc54.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-eef5cc6bce1cc14eba8f3e68971724ef181e88cffcedd74673615f2026b89a62.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/.sqlx/query-ef56d5fefc5774040d1ee397beadb475f6af02768c22f0e583c74062e2e821ce.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/Cargo.lock +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/README.md +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/migrations/20241007163501_initial.sql +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/migrations/20241211120039_merge_job_priority.sql +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/migrations/20241211121159_basic_indexes.sql +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/migrations/20241212151105_check_segment_records.sql +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/migrations/20250110145554_in_flight_messages.sql +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_binding/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_binding/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/fuzzy_query.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/query_io.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/reader.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/request_types.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/resource_indexer.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/schema.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/search_query.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/search_response.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/set_query.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/src/stop_words.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/README.md +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/ar.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/az.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/bn.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/ca.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/ch.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/da.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/de.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/el.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/en.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/es.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/eu.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/extract.py +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/fi.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/fr.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/he.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/hu.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/id.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/it.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/kk.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/ne.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/nl.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/no.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/pt.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/ro.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/ru.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/sl.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/sv.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/tg.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/stop_words/tr.json +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_paragraph/tests/common/mod.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_protos/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_protos/build.py +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_protos/build.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_protos/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_protos/src/nidx.proto +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/tests/test_graph_query_parser_search.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/tests/test_writer.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_tantivy/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_tantivy/src/index_reader.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_tantivy/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_tests/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_tests/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/src/prefilter.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/src/query_io.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/src/reader.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/src/request_types.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/src/resource_indexer.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/src/schema.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/src/search_query.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/tests/test_flow.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/tests/test_search.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_text/tests/test_streaming.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_types/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_types/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_types/src/prefilter.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_types/src/query_language.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/Cargo.toml +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/config.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point/disk_hnsw.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point/mod.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point/node.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point/ops_hnsw.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point/params.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point/ram_hnsw.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point/tests.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point_provider/mod.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_point_provider/reader.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_types/data_store.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_types/mod.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_types/trie.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/data_types/trie_ram.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/formula/mod.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/indexer.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/inverted_index/fst_index.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/inverted_index/map.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/inverted_index.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/query_io.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/request_types.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/utils.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/vector_types/dense_f32.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/src/vector_types/mod.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/tests/common/mod.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/tests/test_basic_search.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_vector/tests/test_hidden.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/api/grpc.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/api/shards.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/api.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/control.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/errors.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/grpc_server.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/import_export.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/indexer.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/lib.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/main.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/metadata/deletion.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/metadata/index.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/metadata/index_request.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/metadata/merge_job.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/metadata/segment.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/metadata/shard.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/metadata.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/metrics.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/scheduler/audit_task.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/scheduler/log_merge.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/scheduler/merge_task.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/scheduler/metrics_task.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/scheduler/purge_tasks.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/scheduler/vector_merge.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/scheduler.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/grpc.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/index_cache.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/query_language.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/query_planner.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/shard_search.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/shard_selector.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/shard_suggest.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/streams.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher/sync.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/searcher.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/segment_store.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/settings.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/telemetry/duration_layer.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/telemetry/log_format.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/telemetry/middleware.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/telemetry.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/tool.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/src/worker.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/common/mod.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/common/services.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_date_range_search.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_search_filtering.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_search_sorting.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_searcher_cluster.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_security_search.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_shards.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_shards_api.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_suggest.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_synced_searcher.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_vector_normalization.rs +0 -0
- {nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/tests/test_vectorsets.rs +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: nidx_binding
|
3
|
-
Version: 6.3.4.
|
3
|
+
Version: 6.3.4.post159
|
4
4
|
Classifier: Programming Language :: Rust
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
@@ -156,7 +156,6 @@ fn create_resource(shard_id: String, timestamp: Timestamp) -> Resource {
|
|
156
156
|
labels: vec!["/l/mylabel_resource".to_string()],
|
157
157
|
paragraphs,
|
158
158
|
paragraphs_to_delete: vec![],
|
159
|
-
relations: vec![],
|
160
159
|
vectors: HashMap::default(),
|
161
160
|
vectors_to_delete: HashMap::default(),
|
162
161
|
shard_id,
|
@@ -4,7 +4,7 @@ build-backend = "pdm.backend"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "nidx_protos"
|
7
|
-
version = "6.3.4.
|
7
|
+
version = "6.3.4.post159"
|
8
8
|
license = { text = "AGPL" }
|
9
9
|
description = "Protobuf definitions for nucliadb/nidx"
|
10
10
|
authors = [ { name = "Nuclia", email = "nucliadb@nuclia.com" }]
|
@@ -0,0 +1,177 @@
|
|
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 tantivy::{
|
24
|
+
DocId, Score, SegmentOrdinal, SegmentReader,
|
25
|
+
collector::{Collector, SegmentCollector},
|
26
|
+
columnar::Column,
|
27
|
+
};
|
28
|
+
|
29
|
+
#[derive(Clone, Copy)]
|
30
|
+
pub enum NodeSelector {
|
31
|
+
SourceNodes,
|
32
|
+
DestinationNodes,
|
33
|
+
}
|
34
|
+
|
35
|
+
// Node collector for schema v2
|
36
|
+
//
|
37
|
+
// We can now use fast fields to uniquely identify nodes.
|
38
|
+
|
39
|
+
pub struct TopUniqueNodeCollector2 {
|
40
|
+
limit: usize,
|
41
|
+
selector: NodeSelector,
|
42
|
+
}
|
43
|
+
|
44
|
+
pub struct TopUniqueNodeSegmentCollector2 {
|
45
|
+
limit: usize,
|
46
|
+
unique: HashSet<Vec<u64>>,
|
47
|
+
encoded_node_reader: Column<u64>,
|
48
|
+
}
|
49
|
+
|
50
|
+
// Relations collector for schema v2
|
51
|
+
pub struct TopUniqueRelationCollector2 {
|
52
|
+
limit: usize,
|
53
|
+
}
|
54
|
+
|
55
|
+
pub struct TopUniqueRelationSegmentCollector2 {
|
56
|
+
limit: usize,
|
57
|
+
unique: HashSet<Vec<u64>>,
|
58
|
+
encoded_relation_reader: Column<u64>,
|
59
|
+
}
|
60
|
+
|
61
|
+
impl TopUniqueNodeCollector2 {
|
62
|
+
pub fn new(selector: NodeSelector, limit: usize) -> Self {
|
63
|
+
Self { limit, selector }
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
impl Collector for TopUniqueNodeCollector2 {
|
68
|
+
type Fruit = HashSet<Vec<u64>>;
|
69
|
+
type Child = TopUniqueNodeSegmentCollector2;
|
70
|
+
|
71
|
+
fn requires_scoring(&self) -> bool {
|
72
|
+
false
|
73
|
+
}
|
74
|
+
|
75
|
+
fn for_segment(&self, _segment_local_id: SegmentOrdinal, segment: &SegmentReader) -> tantivy::Result<Self::Child> {
|
76
|
+
let fast_field_reader = match self.selector {
|
77
|
+
NodeSelector::SourceNodes => segment.fast_fields().u64("encoded_source_id")?,
|
78
|
+
NodeSelector::DestinationNodes => segment.fast_fields().u64("encoded_target_id")?,
|
79
|
+
};
|
80
|
+
Ok(TopUniqueNodeSegmentCollector2 {
|
81
|
+
limit: self.limit,
|
82
|
+
unique: HashSet::new(),
|
83
|
+
encoded_node_reader: fast_field_reader,
|
84
|
+
})
|
85
|
+
}
|
86
|
+
|
87
|
+
fn merge_fruits(
|
88
|
+
&self,
|
89
|
+
segment_fruits: Vec<<Self::Child as SegmentCollector>::Fruit>,
|
90
|
+
) -> tantivy::Result<Self::Fruit> {
|
91
|
+
let mut unique = HashSet::new();
|
92
|
+
let mut fruits = segment_fruits.into_iter().flatten();
|
93
|
+
let mut fruit = fruits.next();
|
94
|
+
|
95
|
+
while fruit.is_some() && unique.len() < self.limit {
|
96
|
+
unique.insert(fruit.unwrap());
|
97
|
+
fruit = fruits.next();
|
98
|
+
}
|
99
|
+
Ok(unique)
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
impl SegmentCollector for TopUniqueNodeSegmentCollector2 {
|
104
|
+
type Fruit = HashSet<Vec<u64>>;
|
105
|
+
|
106
|
+
fn collect(&mut self, doc_id: DocId, _score: Score) {
|
107
|
+
// we already have all unique results we need
|
108
|
+
if self.unique.len() >= self.limit {
|
109
|
+
return;
|
110
|
+
}
|
111
|
+
let encoded_node = self.encoded_node_reader.values_for_doc(doc_id).collect::<Vec<u64>>();
|
112
|
+
self.unique.insert(encoded_node);
|
113
|
+
}
|
114
|
+
|
115
|
+
fn harvest(self) -> Self::Fruit {
|
116
|
+
self.unique
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
impl TopUniqueRelationCollector2 {
|
121
|
+
pub fn new(limit: usize) -> Self {
|
122
|
+
Self { limit }
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
impl Collector for TopUniqueRelationCollector2 {
|
127
|
+
type Fruit = HashSet<Vec<u64>>;
|
128
|
+
type Child = TopUniqueRelationSegmentCollector2;
|
129
|
+
|
130
|
+
fn requires_scoring(&self) -> bool {
|
131
|
+
false
|
132
|
+
}
|
133
|
+
|
134
|
+
fn for_segment(&self, _segment_local_id: SegmentOrdinal, segment: &SegmentReader) -> tantivy::Result<Self::Child> {
|
135
|
+
Ok(TopUniqueRelationSegmentCollector2 {
|
136
|
+
limit: self.limit,
|
137
|
+
unique: HashSet::new(),
|
138
|
+
encoded_relation_reader: segment.fast_fields().u64("encoded_relation_id")?,
|
139
|
+
})
|
140
|
+
}
|
141
|
+
|
142
|
+
fn merge_fruits(
|
143
|
+
&self,
|
144
|
+
segment_fruits: Vec<<Self::Child as SegmentCollector>::Fruit>,
|
145
|
+
) -> tantivy::Result<Self::Fruit> {
|
146
|
+
let mut unique = HashSet::new();
|
147
|
+
let mut fruits = segment_fruits.into_iter().flat_map(|map| map.into_iter());
|
148
|
+
let mut fruit = fruits.next();
|
149
|
+
|
150
|
+
while fruit.is_some() && unique.len() < self.limit {
|
151
|
+
unique.insert(fruit.unwrap());
|
152
|
+
fruit = fruits.next();
|
153
|
+
}
|
154
|
+
Ok(unique)
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
impl SegmentCollector for TopUniqueRelationSegmentCollector2 {
|
159
|
+
type Fruit = HashSet<Vec<u64>>;
|
160
|
+
|
161
|
+
fn collect(&mut self, doc_id: DocId, _score: Score) {
|
162
|
+
// we already have all unique results we need
|
163
|
+
if self.unique.len() >= self.limit {
|
164
|
+
return;
|
165
|
+
}
|
166
|
+
|
167
|
+
let relation = self
|
168
|
+
.encoded_relation_reader
|
169
|
+
.values_for_doc(doc_id)
|
170
|
+
.collect::<Vec<u64>>();
|
171
|
+
self.unique.insert(relation);
|
172
|
+
}
|
173
|
+
|
174
|
+
fn harvest(self) -> Self::Fruit {
|
175
|
+
self.unique
|
176
|
+
}
|
177
|
+
}
|
{nidx_binding-6.3.4.post148 → nidx_binding-6.3.4.post159}/nidx_relation/src/graph_query_parser.rs
RENAMED
@@ -18,11 +18,12 @@
|
|
18
18
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
19
|
//
|
20
20
|
use anyhow::anyhow;
|
21
|
+
use nidx_protos::graph_query::FacetFilter;
|
21
22
|
use nidx_protos::relation::RelationType;
|
22
23
|
use nidx_protos::relation_node::NodeType;
|
23
24
|
use nidx_types::query_language::{BooleanExpression, BooleanOperation, Operator};
|
24
25
|
use tantivy::query::{AllQuery, BooleanQuery, FuzzyTermQuery, Occur, Query, TermQuery};
|
25
|
-
use tantivy::schema::{Field, IndexRecordOption};
|
26
|
+
use tantivy::schema::{Facet, Field, IndexRecordOption};
|
26
27
|
use tantivy::tokenizer::TokenizerManager;
|
27
28
|
|
28
29
|
use crate::io_maps;
|
@@ -109,6 +110,8 @@ pub enum GraphQuery {
|
|
109
110
|
RelationQuery(RelationQuery),
|
110
111
|
// (:A)-[:R]->(:B)
|
111
112
|
PathQuery(PathQuery),
|
113
|
+
|
114
|
+
Facet(String),
|
112
115
|
}
|
113
116
|
|
114
117
|
#[derive(Clone, Copy)]
|
@@ -117,24 +120,19 @@ enum NodePosition {
|
|
117
120
|
Destination,
|
118
121
|
}
|
119
122
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
struct TokenizedNodeFields {
|
125
|
-
exact: Field,
|
126
|
-
tokenized: Field,
|
123
|
+
#[derive(Clone)]
|
124
|
+
enum NodeExpression {
|
125
|
+
Node(Node),
|
126
|
+
Facet(String),
|
127
127
|
}
|
128
128
|
|
129
|
-
|
130
|
-
|
131
|
-
Normalized(Field),
|
132
|
-
Tokenized(TokenizedNodeFields),
|
133
|
-
}
|
129
|
+
pub struct BoolNodeQuery(BooleanExpression<NodeExpression>);
|
130
|
+
pub struct BoolGraphQuery(BooleanExpression<GraphQuery>);
|
134
131
|
|
135
132
|
#[derive(Clone, Copy)]
|
136
133
|
struct NodeSchemaFields {
|
137
|
-
|
134
|
+
exact_value: Field,
|
135
|
+
tokenized_value: Field,
|
138
136
|
node_type: Field,
|
139
137
|
node_subtype: Field,
|
140
138
|
}
|
@@ -183,9 +181,13 @@ impl<'a> GraphQueryParser<'a> {
|
|
183
181
|
)
|
184
182
|
}
|
185
183
|
|
186
|
-
fn inner_parse_bool_node(
|
184
|
+
fn inner_parse_bool_node(
|
185
|
+
&self,
|
186
|
+
query: BooleanExpression<NodeExpression>,
|
187
|
+
position: NodePosition,
|
188
|
+
) -> Box<dyn Query> {
|
187
189
|
match query {
|
188
|
-
BooleanExpression::Literal(node) => match position {
|
190
|
+
BooleanExpression::Literal(NodeExpression::Node(node)) => match position {
|
189
191
|
NodePosition::Source => {
|
190
192
|
self.parse(GraphQuery::NodeQuery(NodeQuery::SourceNode(Expression::Value(node))))
|
191
193
|
}
|
@@ -193,6 +195,7 @@ impl<'a> GraphQueryParser<'a> {
|
|
193
195
|
Expression::Value(node),
|
194
196
|
))),
|
195
197
|
},
|
198
|
+
BooleanExpression::Literal(NodeExpression::Facet(facet)) => self.parse_facet(&facet),
|
196
199
|
BooleanExpression::Not(subquery) => {
|
197
200
|
let subqueries = vec![
|
198
201
|
(Occur::Must, Box::new(AllQuery) as Box<dyn Query>),
|
@@ -221,6 +224,7 @@ impl<'a> GraphQueryParser<'a> {
|
|
221
224
|
GraphQuery::NodeQuery(query) => self.parse_node_query(query),
|
222
225
|
GraphQuery::RelationQuery(query) => self.parse_relation_query(query),
|
223
226
|
GraphQuery::PathQuery(query) => self.parse_path_query(query),
|
227
|
+
GraphQuery::Facet(facet) => self.parse_facet(&facet),
|
224
228
|
}
|
225
229
|
}
|
226
230
|
|
@@ -256,6 +260,13 @@ impl<'a> GraphQueryParser<'a> {
|
|
256
260
|
self.parse_path_query(equivalent_path_query)
|
257
261
|
}
|
258
262
|
|
263
|
+
fn parse_facet(&self, facet: &str) -> Box<dyn Query> {
|
264
|
+
Box::new(TermQuery::new(
|
265
|
+
tantivy::Term::from_facet(self.schema.facets, &Facet::from_text(facet).expect("Invalid facet")),
|
266
|
+
IndexRecordOption::Basic,
|
267
|
+
))
|
268
|
+
}
|
269
|
+
|
259
270
|
fn parse_path_query(&self, query: PathQuery) -> Box<dyn Query> {
|
260
271
|
match query {
|
261
272
|
PathQuery::DirectedPath((source_expression, relation_expression, destination_expression)) => {
|
@@ -286,18 +297,11 @@ impl<'a> GraphQueryParser<'a> {
|
|
286
297
|
|
287
298
|
#[inline]
|
288
299
|
fn has_node_expression_as_source(&self, expression: &Expression<Node>) -> Vec<(Occur, Box<dyn Query>)> {
|
289
|
-
let value = if self.schema.version == 1 {
|
290
|
-
NodeValueField::Normalized(self.schema.normalized_source_value)
|
291
|
-
} else {
|
292
|
-
NodeValueField::Tokenized(TokenizedNodeFields {
|
293
|
-
exact: self.schema.normalized_source_value,
|
294
|
-
tokenized: self.schema.source_value,
|
295
|
-
})
|
296
|
-
};
|
297
300
|
self.has_node_expression(
|
298
301
|
expression,
|
299
302
|
NodeSchemaFields {
|
300
|
-
|
303
|
+
exact_value: self.schema.normalized_source_value,
|
304
|
+
tokenized_value: self.schema.source_value,
|
301
305
|
node_type: self.schema.source_type,
|
302
306
|
node_subtype: self.schema.source_subtype,
|
303
307
|
},
|
@@ -306,18 +310,11 @@ impl<'a> GraphQueryParser<'a> {
|
|
306
310
|
|
307
311
|
#[inline]
|
308
312
|
fn has_node_expression_as_destination(&self, expression: &Expression<Node>) -> Vec<(Occur, Box<dyn Query>)> {
|
309
|
-
let value = if self.schema.version == 1 {
|
310
|
-
NodeValueField::Normalized(self.schema.normalized_target_value)
|
311
|
-
} else {
|
312
|
-
NodeValueField::Tokenized(TokenizedNodeFields {
|
313
|
-
exact: self.schema.normalized_target_value,
|
314
|
-
tokenized: self.schema.target_value,
|
315
|
-
})
|
316
|
-
};
|
317
313
|
self.has_node_expression(
|
318
314
|
expression,
|
319
315
|
NodeSchemaFields {
|
320
|
-
|
316
|
+
exact_value: self.schema.normalized_target_value,
|
317
|
+
tokenized_value: self.schema.target_value,
|
321
318
|
node_type: self.schema.target_type,
|
322
319
|
node_subtype: self.schema.target_subtype,
|
323
320
|
},
|
@@ -403,7 +400,7 @@ impl<'a> GraphQueryParser<'a> {
|
|
403
400
|
let value_query = node
|
404
401
|
.value
|
405
402
|
.as_ref()
|
406
|
-
.and_then(|value| self.has_node_value(value, fields.
|
403
|
+
.and_then(|value| self.has_node_value(value, fields.exact_value, fields.tokenized_value));
|
407
404
|
if let Some(query) = value_query {
|
408
405
|
subqueries.push(query);
|
409
406
|
}
|
@@ -468,7 +465,7 @@ impl<'a> GraphQueryParser<'a> {
|
|
468
465
|
subqueries
|
469
466
|
}
|
470
467
|
|
471
|
-
fn has_node_value(&self, value: &Term,
|
468
|
+
fn has_node_value(&self, value: &Term, exact_field: Field, tokenized_field: Field) -> Option<Box<dyn Query>> {
|
472
469
|
let text_value = match value {
|
473
470
|
Term::Exact(value) => value,
|
474
471
|
Term::Fuzzy(fuzzy) => &fuzzy.value,
|
@@ -476,31 +473,14 @@ impl<'a> GraphQueryParser<'a> {
|
|
476
473
|
if text_value.is_empty() {
|
477
474
|
return None;
|
478
475
|
}
|
479
|
-
let exact_term =
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
}
|
487
|
-
let tokenized_terms = match field {
|
488
|
-
NodeValueField::Normalized(field) => {
|
489
|
-
vec![tantivy::Term::from_field_text(
|
490
|
-
field,
|
491
|
-
&self.schema.normalize(text_value),
|
492
|
-
)]
|
493
|
-
}
|
494
|
-
NodeValueField::Tokenized(TokenizedNodeFields { tokenized, .. }) => {
|
495
|
-
let mut tokenizer = TokenizerManager::default().get("default").unwrap();
|
496
|
-
let mut token_stream = tokenizer.token_stream(text_value);
|
497
|
-
let mut terms = Vec::new();
|
498
|
-
while let Some(token) = token_stream.next() {
|
499
|
-
terms.push(tantivy::Term::from_field_text(tokenized, &token.text));
|
500
|
-
}
|
501
|
-
terms
|
502
|
-
}
|
503
|
-
};
|
476
|
+
let exact_term = tantivy::Term::from_field_text(exact_field, &self.schema.normalize(text_value));
|
477
|
+
|
478
|
+
let mut tokenizer = TokenizerManager::default().get("default").unwrap();
|
479
|
+
let mut token_stream = tokenizer.token_stream(text_value);
|
480
|
+
let mut tokenized_terms = Vec::new();
|
481
|
+
while let Some(token) = token_stream.next() {
|
482
|
+
tokenized_terms.push(tantivy::Term::from_field_text(tokenized_field, &token.text));
|
483
|
+
}
|
504
484
|
|
505
485
|
// TODO: Rethink this
|
506
486
|
// Current logic:
|
@@ -606,14 +586,12 @@ impl TryFrom<&nidx_protos::graph_query::PathQuery> for BoolNodeQuery {
|
|
606
586
|
|
607
587
|
let pb_node = path.source.as_ref().unwrap();
|
608
588
|
let node = Node::try_from(pb_node)?;
|
609
|
-
BooleanExpression::Literal(node)
|
589
|
+
BooleanExpression::Literal(NodeExpression::Node(node))
|
610
590
|
}
|
611
|
-
|
612
591
|
nidx_protos::graph_query::path_query::Query::BoolNot(bool_not) => {
|
613
592
|
let subquery = BoolNodeQuery::try_from(bool_not.as_ref())?.0;
|
614
593
|
BooleanExpression::Not(Box::new(subquery))
|
615
594
|
}
|
616
|
-
|
617
595
|
nidx_protos::graph_query::path_query::Query::BoolAnd(bool_and) => {
|
618
596
|
BooleanExpression::Operation(BooleanOperation {
|
619
597
|
operator: Operator::And,
|
@@ -624,7 +602,6 @@ impl TryFrom<&nidx_protos::graph_query::PathQuery> for BoolNodeQuery {
|
|
624
602
|
.collect::<anyhow::Result<Vec<_>>>()?,
|
625
603
|
})
|
626
604
|
}
|
627
|
-
|
628
605
|
nidx_protos::graph_query::path_query::Query::BoolOr(bool_or) => {
|
629
606
|
BooleanExpression::Operation(BooleanOperation {
|
630
607
|
operator: Operator::Or,
|
@@ -635,9 +612,12 @@ impl TryFrom<&nidx_protos::graph_query::PathQuery> for BoolNodeQuery {
|
|
635
612
|
.collect::<anyhow::Result<Vec<_>>>()?,
|
636
613
|
})
|
637
614
|
}
|
615
|
+
nidx_protos::graph_query::path_query::Query::Facet(FacetFilter { facet }) => {
|
616
|
+
BooleanExpression::Literal(NodeExpression::Facet(facet.clone()))
|
617
|
+
}
|
638
618
|
},
|
639
619
|
|
640
|
-
None => BooleanExpression::Literal(Node::default()),
|
620
|
+
None => BooleanExpression::Literal(NodeExpression::Node(Node::default())),
|
641
621
|
};
|
642
622
|
|
643
623
|
Ok(BoolNodeQuery(bool_expr))
|
@@ -680,12 +660,10 @@ impl TryFrom<&nidx_protos::graph_query::PathQuery> for BoolGraphQuery {
|
|
680
660
|
|
681
661
|
BooleanExpression::Literal(path_query)
|
682
662
|
}
|
683
|
-
|
684
663
|
nidx_protos::graph_query::path_query::Query::BoolNot(bool_not) => {
|
685
664
|
let subquery = BoolGraphQuery::try_from(bool_not.as_ref())?.0;
|
686
665
|
BooleanExpression::Not(Box::new(subquery))
|
687
666
|
}
|
688
|
-
|
689
667
|
nidx_protos::graph_query::path_query::Query::BoolAnd(bool_and) => {
|
690
668
|
BooleanExpression::Operation(BooleanOperation {
|
691
669
|
operator: Operator::And,
|
@@ -696,7 +674,6 @@ impl TryFrom<&nidx_protos::graph_query::PathQuery> for BoolGraphQuery {
|
|
696
674
|
.collect::<anyhow::Result<Vec<_>>>()?,
|
697
675
|
})
|
698
676
|
}
|
699
|
-
|
700
677
|
nidx_protos::graph_query::path_query::Query::BoolOr(bool_or) => {
|
701
678
|
BooleanExpression::Operation(BooleanOperation {
|
702
679
|
operator: Operator::Or,
|
@@ -707,6 +684,9 @@ impl TryFrom<&nidx_protos::graph_query::PathQuery> for BoolGraphQuery {
|
|
707
684
|
.collect::<anyhow::Result<Vec<_>>>()?,
|
708
685
|
})
|
709
686
|
}
|
687
|
+
nidx_protos::graph_query::path_query::Query::Facet(FacetFilter { facet }) => {
|
688
|
+
BooleanExpression::Literal(GraphQuery::Facet(facet.clone()))
|
689
|
+
}
|
710
690
|
},
|
711
691
|
|
712
692
|
None => BooleanExpression::Literal(GraphQuery::PathQuery(PathQuery::UndirectedPath((
|
@@ -105,25 +105,18 @@ pub fn doc_to_relation(schema: &Schema, doc: &TantivyDocument) -> ProtosRelation
|
|
105
105
|
relation_label: schema.relationship_label(doc).to_string(),
|
106
106
|
source: Some(source_to_relation_node(schema, doc)),
|
107
107
|
to: Some(target_to_relation_node(schema, doc)),
|
108
|
-
resource_id: Some(schema.resource_id(doc)),
|
109
108
|
}
|
110
109
|
}
|
111
110
|
|
112
111
|
pub fn doc_to_index_relation(schema: &Schema, doc: &TantivyDocument) -> IndexRelation {
|
113
|
-
let resource_field_id = schema.resource_field_id.
|
114
|
-
|
115
|
-
|
116
|
-
format!("{}/{}", rid.simple(), fid)
|
117
|
-
})
|
112
|
+
let resource_field_id = doc.get_first(schema.resource_field_id).map(|v| {
|
113
|
+
let (rid, fid) = decode_field_id(v.as_bytes().unwrap());
|
114
|
+
format!("{}/{}", rid.simple(), fid)
|
118
115
|
});
|
119
|
-
let facets =
|
120
|
-
.facets
|
121
|
-
.map(|
|
122
|
-
|
123
|
-
.map(|f| f.as_facet().unwrap().to_path_string())
|
124
|
-
.collect()
|
125
|
-
})
|
126
|
-
.unwrap_or_default();
|
116
|
+
let facets = doc
|
117
|
+
.get_all(schema.facets)
|
118
|
+
.map(|f| f.as_facet().unwrap().to_path_string())
|
119
|
+
.collect();
|
127
120
|
IndexRelation {
|
128
121
|
relation: Some(doc_to_relation(schema, doc)),
|
129
122
|
resource_field_id,
|
@@ -25,6 +25,7 @@ mod reader;
|
|
25
25
|
mod resource_indexer;
|
26
26
|
mod schema;
|
27
27
|
|
28
|
+
use anyhow::anyhow;
|
28
29
|
use nidx_protos::{
|
29
30
|
GraphSearchRequest, GraphSearchResponse, RelationNode, RelationNodeFilter, RelationPrefixSearchRequest,
|
30
31
|
RelationSearchRequest, RelationSearchResponse, relation_node::NodeType, relation_prefix_search_request::Search,
|
@@ -82,35 +83,29 @@ pub struct RelationIndexer;
|
|
82
83
|
|
83
84
|
pub struct RelationDeletionQueryBuilder {
|
84
85
|
resource: Field,
|
85
|
-
field:
|
86
|
+
field: Field,
|
86
87
|
}
|
87
88
|
impl DeletionQueryBuilder for RelationDeletionQueryBuilder {
|
88
89
|
fn query<'a>(&self, keys: impl Iterator<Item = &'a String>) -> Box<dyn Query> {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
})))
|
109
|
-
} else {
|
110
|
-
Box::new(TermSetQuery::new(
|
111
|
-
keys.map(|k| Term::from_field_bytes(self.resource, k.as_bytes())),
|
112
|
-
))
|
113
|
-
}
|
90
|
+
Box::new(TermSetQuery::new(keys.filter_map(|k| {
|
91
|
+
// Our keys can be resource or field ids, match the corresponding tantivy field
|
92
|
+
if k.len() < 32 {
|
93
|
+
error!(?k, "Invalid deletion key for nidx_relation");
|
94
|
+
return None;
|
95
|
+
}
|
96
|
+
|
97
|
+
let Ok(rid) = Uuid::parse_str(&k[..32]) else {
|
98
|
+
error!(?k, "Invalid deletion key for nidx_relation");
|
99
|
+
return None;
|
100
|
+
};
|
101
|
+
|
102
|
+
let is_field = k.len() > 32;
|
103
|
+
if is_field {
|
104
|
+
Some(Term::from_field_bytes(self.field, &encode_field_id(rid, &k[33..])))
|
105
|
+
} else {
|
106
|
+
Some(Term::from_field_bytes(self.resource, rid.as_bytes()))
|
107
|
+
}
|
108
|
+
})))
|
114
109
|
}
|
115
110
|
}
|
116
111
|
impl RelationDeletionQueryBuilder {
|
@@ -130,6 +125,9 @@ impl RelationIndexer {
|
|
130
125
|
config: &RelationConfig,
|
131
126
|
resource: &nidx_protos::Resource,
|
132
127
|
) -> anyhow::Result<Option<TantivySegmentMetadata>> {
|
128
|
+
if config.version != 2 {
|
129
|
+
return Err(anyhow!("Unsupported nidx_relation version"));
|
130
|
+
}
|
133
131
|
let field_schema = RelationSchema::new(config.version);
|
134
132
|
let mut indexer = TantivyIndexer::new(output_dir.to_path_buf(), field_schema.schema.clone())?;
|
135
133
|
|
@@ -141,17 +139,13 @@ impl RelationIndexer {
|
|
141
139
|
indexer.finalize()
|
142
140
|
}
|
143
141
|
|
144
|
-
pub fn deletions_for_resource(&self,
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
.collect()
|
152
|
-
} else {
|
153
|
-
vec![resource.resource.as_ref().unwrap().uuid.clone()]
|
154
|
-
}
|
142
|
+
pub fn deletions_for_resource(&self, _config: &RelationConfig, resource: &nidx_protos::Resource) -> Vec<String> {
|
143
|
+
let rid = &resource.resource.as_ref().unwrap().uuid;
|
144
|
+
resource
|
145
|
+
.relation_fields_to_delete
|
146
|
+
.iter()
|
147
|
+
.map(|f| format!("{rid}/{f}"))
|
148
|
+
.collect()
|
155
149
|
}
|
156
150
|
|
157
151
|
#[instrument(name = "relation::merge", skip_all)]
|
@@ -161,6 +155,9 @@ impl RelationIndexer {
|
|
161
155
|
config: RelationConfig,
|
162
156
|
open_index: impl OpenIndexMetadata<TantivyMeta>,
|
163
157
|
) -> anyhow::Result<TantivySegmentMetadata> {
|
158
|
+
if config.version != 2 {
|
159
|
+
return Err(anyhow!("Unsupported nidx_relation version"));
|
160
|
+
}
|
164
161
|
let schema = RelationSchema::new(config.version);
|
165
162
|
let deletions_query = RelationDeletionQueryBuilder::new(&schema);
|
166
163
|
let index = open_index_with_deletions(schema.schema, open_index, deletions_query)?;
|
@@ -185,6 +182,9 @@ pub struct RelationSearcher {
|
|
185
182
|
impl RelationSearcher {
|
186
183
|
#[instrument(name = "relation::open", skip_all)]
|
187
184
|
pub fn open(config: RelationConfig, open_index: impl OpenIndexMetadata<TantivyMeta>) -> anyhow::Result<Self> {
|
185
|
+
if config.version != 2 {
|
186
|
+
return Err(anyhow!("Unsupported nidx_relation version"));
|
187
|
+
}
|
188
188
|
let schema = RelationSchema::new(config.version);
|
189
189
|
let deletions_query = RelationDeletionQueryBuilder::new(&schema);
|
190
190
|
let index = open_index_with_deletions(schema.schema, open_index, deletions_query)?;
|