Package dev.gmitch215.bytebox.binding
Interface Vectorize
- All Superinterfaces:
org.teavm.jso.JSObject
public interface Vectorize
extends org.teavm.jso.JSObject
A Vectorize index. Declared with
vectorize(), named VECTORIZE by default.
No local emulation exists, so a test either fakes this binding or points it at the real index.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault TSObjectdeleteByIds(String... ids) Removes vectors by id.default TSObjectdescribe()Returns the index's dimension, metric and vector count.org.teavm.jso.core.JSPromise<TSObject> org.teavm.jso.core.JSPromise<TSObject> fetchByIds(org.teavm.jso.core.JSArray<TSObject> ids) default TSObjectReads vectors by id.default TSObjectAdds vectors, failing on an id that already exists.org.teavm.jso.core.JSPromise<TSObject> insertVectors(org.teavm.jso.core.JSArray<TSObject> vectors) default TSObjectquery(double[] vector, int topK) Finds the nearest vectors.default TSObjectFinds the nearest vectors, returning their metadata and values too.org.teavm.jso.core.JSPromise<TSObject> removeByIds(org.teavm.jso.core.JSArray<TSObject> ids) org.teavm.jso.core.JSPromise<TSObject> default TSObjectAdds or replaces vectors.org.teavm.jso.core.JSPromise<TSObject> upsertVectors(org.teavm.jso.core.JSArray<TSObject> vectors) Methods inherited from interface org.teavm.jso.JSObject
cast
-
Method Details
-
query
Finds the nearest vectors.- Parameters:
vector- the query vectortopK- how many matches to return- Returns:
- the matches, ordered nearest first
-
query
Finds the nearest vectors, returning their metadata and values too.- Parameters:
vector- the query vectortopK- how many matches to returnoptions-returnValues,returnMetadata,filter,namespace- Returns:
- the matches
-
insert
Adds vectors, failing on an id that already exists.- Parameters:
vectors- each carryingid,valuesand optionallymetadata- Returns:
- the write's outcome
-
upsert
Adds or replaces vectors.- Parameters:
vectors- each carryingid,valuesand optionallymetadata- Returns:
- the write's outcome
-
getByIds
Reads vectors by id.- Parameters:
ids- the ids- Returns:
- the vectors that exist
-
deleteByIds
Removes vectors by id.- Parameters:
ids- the ids- Returns:
- the deletion's outcome
-
describe
Returns the index's dimension, metric and vector count.- Returns:
- the index's dimension, metric and vector count
-
runQuery
-
insertVectors
-
upsertVectors
-
fetchByIds
-
removeByIds
-
describeIndex
org.teavm.jso.core.JSPromise<TSObject> describeIndex()
-