lshvector
a feature vector type and a locality sensitive hashing index
lshvector · a feature vector type and a locality sensitive hashing index
Overview
Usage
Sources:
- Official upstream README
- Official extension control file (lshvector.control)
- Official extension SQL (lshvector–1.0.sql)
lshvector — a feature vector type and a locality sensitive hashing index. Use it for the corresponding vector, model, or retrieval workflow. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
lsh_getweight(lshvector)is an extension function and returnsfloat8.lsh_load()is an extension function and returnsint4.lsh_reload()is an extension function and returnsint4.lshvector_compare(lshvector,lshvector)is an extension function and returnslshvector_comptype.lshvector_gin_consistent(internal, int2, lshvector, int4, internal, internal, internal, internal)is an extension function.lshvector_gin_extract_query(lshvector,internal,int2,internal,internal,internal,internal)is an extension function and returnsinternal.lshvector_gin_extract_value(lshvector,internal)is an extension function and returnsinternal.lshvector_hash(lshvector)is an extension function and returnsint8.lshvector_in(cstring)is an extension function and returnslshvector.lshvector_out(lshvector)is an extension function and returnscstring.lshvector_overlap(lshvector,lshvector)is an extension function.lshvector_recv(internal)is an extension function and returnslshvector.lshvector_send(lshvector)is an extension function and returnsbytea.lshvectoris an extension-defined type.
Requirements and Caveats
- The reviewed control file declares default version
1.0. - The control file marks the extension as relocatable.
- The control file does not require superuser-only installation.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.