adapters
Bases: ABC
Backend-agnostic read/write interface for one vector collection.
Source code in vecparity/adapters/base.py
count()
abstractmethod
delete(ids)
abstractmethod
get(id)
abstractmethod
list_changed_since(cursor)
abstractmethod
Yield records created/updated at or after cursor (a unix
timestamp), inclusive. cursor=None means from the beginning
(full backfill).
Inclusive (>=), not exclusive (>), on purpose: SyncEngine
relies on this to avoid silently dropping a record that shares
its timestamp with the previous cursor value but wasn't visible
yet when that boundary was set. SyncEngine deduplicates the
resulting re-fetched boundary records itself.
Source code in vecparity/adapters/base.py
list_deleted_since(cursor)
Yield (id, deleted_at) pairs for records deleted at or after
cursor, inclusive, for live delete propagation.
Optional, not abstract: list_changed_since alone has no way to
discover a source deletion (a delete leaves no record behind for
it to yield), so SyncEngine calls this when a backend provides
it and propagates the deletes to the target. Backends without a
tombstone/change-log mechanism can leave this unimplemented;
SyncEngine treats an empty default as "deletes aren't tracked
for this source," not an error.
Returns a timestamp per id, not bare ids, so SyncEngine can run
the same inclusive-cursor, dedup-by-id boundary tracking it uses
for list_changed_since, and advance one unified cursor across
both upserts and deletes.
Source code in vecparity/adapters/base.py
search(vector, top_k, filter=None)
abstractmethod
Run a similarity search, used only for parity verification.
filter, if given, is an equality-only metadata filter: every
key must match its value exactly (an implicit AND across keys).
This is deliberately not a general query DSL, only enough to
replay a golden query's original filter during a parity check,
so a check against a filtered production query path doesn't
silently compare unfiltered results instead. An adapter that
can't apply a given filter should raise, not silently ignore it,
since a silently-unfiltered comparison would corrupt the report.
Source code in vecparity/adapters/base.py
Bases: VectorDBAdapter
Source code in vecparity/adapters/memory.py
Bases: VectorDBAdapter
Source code in vecparity/adapters/pgvector.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
Bases: VectorDBAdapter
Source code in vecparity/adapters/qdrant.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
Bases: VectorDBAdapter
Source code in vecparity/adapters/pinecone.py
Bases: VectorDBAdapter
Source code in vecparity/adapters/milvus.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
Bases: VectorDBAdapter
Source code in vecparity/adapters/weaviate.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
Bases: VectorDBAdapter