langchain_community.vectorstores.infinispanvs.Infinispan¶

class langchain_community.vectorstores.infinispanvs.Infinispan(**kwargs: Any)[source]¶

Helper class for Infinispan REST interface.

This class exposes the Infinispan operations needed to create and set up a vector db.

You need a running Infinispan (15+) server without authentication. You can easily start one, see: https://github.com/rigazilla/infinispan-vector#run-infinispan

Methods

__init__(**kwargs)

cache_clear(cache_name)

Clear a cache :param cache_name: name of the cache.

cache_delete(name)

Delete a cache :param name: name of the cache.

cache_post(name, config)

Create a cache :param name: name of the cache.

get(key, cache_name)

Get an entry :param key: key of the entry :type key: str :param cache_name: target cache :type cache_name: str

index_clear(cache_name)

Clear an index on a cache :param cache_name: name of the cache.

index_reindex(cache_name)

Rebuild index on a cache :param cache_name: name of the cache.

post(key, data, cache_name)

Post an entry :param key: key of the entry :type key: str :param data: content of the entry in json format :type data: str :param cache_name: target cache :type cache_name: str

put(key, data, cache_name)

Put an entry :param key: key of the entry :type key: str :param data: content of the entry in json format :type data: str :param cache_name: target cache :type cache_name: str

req_query(query, cache_name[, local])

Request a query :param query: query requested :type query: str :param cache_name: name of the target cache :type cache_name: str :param local: whether the query is local to clustered :type local: boolean

schema_delete(name)

Delete a schema :param name: name of the schema.

schema_post(name, proto)

Deploy a schema :param name: name of the schema.

Parameters

kwargs (Any) –

__init__(**kwargs: Any)[source]¶
Parameters

kwargs (Any) –

cache_clear(cache_name: str) Response[source]¶

Clear a cache :param cache_name: name of the cache. :type cache_name: str

Returns

An http Response containing the result of the operation

Parameters

cache_name (str) –

Return type

Response

cache_delete(name: str) Response[source]¶

Delete a cache :param name: name of the cache. :type name: str

Returns

An http Response containing the result of the operation

Parameters

name (str) –

Return type

Response

cache_post(name: str, config: str) Response[source]¶

Create a cache :param name: name of the cache. :type name: str :param config: configuration of the cache. :type config: str

Returns

An http Response containing the result of the operation

Parameters
  • name (str) –

  • config (str) –

Return type

Response

get(key: str, cache_name: str) Response[source]¶

Get an entry :param key: key of the entry :type key: str :param cache_name: target cache :type cache_name: str

Returns

An http Response containing the entry or errors

Parameters
  • key (str) –

  • cache_name (str) –

Return type

Response

index_clear(cache_name: str) Response[source]¶

Clear an index on a cache :param cache_name: name of the cache. :type cache_name: str

Returns

An http Response containing the result of the operation

Parameters

cache_name (str) –

Return type

Response

index_reindex(cache_name: str) Response[source]¶

Rebuild index on a cache :param cache_name: name of the cache. :type cache_name: str

Returns

An http Response containing the result of the operation

Parameters

cache_name (str) –

Return type

Response

post(key: str, data: str, cache_name: str) Response[source]¶

Post an entry :param key: key of the entry :type key: str :param data: content of the entry in json format :type data: str :param cache_name: target cache :type cache_name: str

Returns

An http Response containing the result of the operation

Parameters
  • key (str) –

  • data (str) –

  • cache_name (str) –

Return type

Response

put(key: str, data: str, cache_name: str) Response[source]¶

Put an entry :param key: key of the entry :type key: str :param data: content of the entry in json format :type data: str :param cache_name: target cache :type cache_name: str

Returns

An http Response containing the result of the operation

Parameters
  • key (str) –

  • data (str) –

  • cache_name (str) –

Return type

Response

req_query(query: str, cache_name: str, local: bool = False) Response[source]¶

Request a query :param query: query requested :type query: str :param cache_name: name of the target cache :type cache_name: str :param local: whether the query is local to clustered :type local: boolean

Returns

An http Response containing the result set or errors

Parameters
  • query (str) –

  • cache_name (str) –

  • local (bool) –

Return type

Response

schema_delete(name: str) Response[source]¶

Delete a schema :param name: name of the schema. :type name: str

Returns

An http Response containing the result of the operation

Parameters

name (str) –

Return type

Response

schema_post(name: str, proto: str) Response[source]¶

Deploy a schema :param name: name of the schema. Will be used as a key :type name: str :param proto: protobuf schema :type proto: str

Returns

An http Response containing the result of the operation

Parameters
  • name (str) –

  • proto (str) –

Return type

Response