docs/versioned_docs/version-3.0.0-LTS/marketplace/plugins/weaviate.md
Weaviate is a vector database, integrating Weaviate with ToolJet enables efficient vector search and semantic querying, allowing applications to retrieve relevant information based on meaning rather than exact keywords. This integration is ideal for building AI-powered search engines, recommendation systems, and knowledge retrieval applications that enhance user experience with context-aware results.
To connect with Weaviate Cloud, you will need the Instance URL and the API Key, which can be generated from Weaviate Console.
To connect ToolJet with Weaviate Local, you will need the Host and the Port.
Run the following Docker command to start the container locally. This will set the host to localhost and port to 8080.
docker run -p 8080:8080 -p 50051:50051 cr.weaviate.io/semitechnologies/weaviate:1.28.4
Run this opetation to get the database schema.
Optional Patameter
{
"classes": [
{
"class": "Createcollection",
"description": "Test collection create",
"invertedIndexConfig": {
"bm25": {
"b": 0.75,
"k1": 1.2
},
"cleanupIntervalSeconds": 300,
"indexNullState": true,
"indexPropertyLength": true,
"indexTimestamps": true,
"stopwords": {
"additions": [
"custom1"
],
"preset": "en",
"removals": [
"the"
]
}
},
"moduleConfig": {
"text2vec-contextionary": {
"vectorizeClassName": true
}
},
"multiTenancyConfig": {
"autoTenantActivation": false,
"autoTenantCreation": false,
"enabled": false
},
"properties": [
{
"dataType": [
"text"
],
"description": "Main text field",
"indexFilterable": true,
"indexRangeFilters": false,
"indexSearchable": true,
"name": "content",
"tokenization": "word"
}
],
"replicationConfig": {
"asyncEnabled": true,
"deletionStrategy": "NoAutomatedResolution",
"factor": 1
},
"shardingConfig": {
"virtualPerPhysical": 128,
"desiredCount": 1,
"actualCount": 1,
"desiredVirtualCount": 128,
"actualVirtualCount": 128,
"key": "_id",
"strategy": "hash",
"function": "murmur3"
},
"vectorIndexConfig": {
"skip": false,
"cleanupIntervalSeconds": 300,
"maxConnections": 64,
"efConstruction": 128,
"ef": -1,
"dynamicEfMin": 100,
"dynamicEfMax": 500,
"dynamicEfFactor": 8,
"vectorCacheMaxObjects": 1000000000000,
"flatSearchCutoff": 40000,
"distance": "cosine",
"pq": {
"enabled": false,
"bitCompression": false,
"segments": 0,
"centroids": 256,
"trainingLimit": 100000,
"encoder": {
"type": "kmeans",
"distribution": "log-normal"
}
},
"bq": {
"enabled": false
},
"sq": {
"enabled": false,
"trainingLimit": 100000,
"rescoreLimit": 20
},
"filterStrategy": "sweeping"
},
"vectorIndexType": "hnsw",
"vectorizer": "none"
}
]
}
Required Parameter
Optional Parameter
{
[
{
"dataType":["text"],
"description":"Main text field",
"indexFilterable":true,
"indexRangeFilters":false,
"indexSearchable":true,
"name":"content",
"tokenization":"word"
}
],
"replicationConfig":{
"asyncEnabled":true,
"deletionStrategy":"NoAutomatedResolution",
"factor":1
},
"shardingConfig":{
"virtualPerPhysical":128,
"desiredCount":1,
"actualCount":1,
"desiredVirtualCount":128,
"actualVirtualCount":128,
"key":"_id",
"strategy":"hash",
"function":"murmur3"
},
"vectorIndexConfig":{
"skip":false,
"cleanupIntervalSeconds":300,
"maxConnections":64,
"efConstruction":128,
"ef":-1,
"dynamicEfMin":100,
"dynamicEfMax":500,
"dynamicEfFactor":8,
"vectorCacheMaxObjects":1000000000000,
"flatSearchCutoff":40000,
"distance":"cosine",
"pq":{
"enabled":false,
"bitCompression":false,
"segments":0,
"centroids":256,
"trainingLimit":100000,
"encoder":{
"type":"kmeans",
"distribution":"log-normal"
}
},
"bq":{
"enabled":false
},
"sq":{
"enabled":false,
"trainingLimit":100000,
"rescoreLimit":20
},
"filterStrategy":"sweeping"
},
"vectorIndexType":"hnsw",
"vectorizer":"none"
}
Use this operation to create a new collection.
Required Parameters
Required Parameters
Refer to weaviate documentation for more information.
<details id="tj-dropdown"> <summary>**Response Example**</summary>
{
"class":"Newcollection",
"description":"Test collection create",
"invertedIndexConfig":{
"bm25":{
"b":0.75,
"k1":1.2
},
"cleanupIntervalSeconds":300,
"indexNullState":true,
"indexPropertyLength":true,
"indexTimestamps":true,
"stopwords":{
"additions":[
"custom1"
],
"preset":"en",
"removals":[
"the"
]
}
},
"moduleConfig":{
"text2vec-contextionary":{
"vectorizeClassName":true
}
},
"multiTenancyConfig":{
"autoTenantActivation":false,
"autoTenantCreation":false,
"enabled":false
},
"properties":[
{
"dataType":[
"text"
],
"description":"Main text field",
"indexFilterable":true,
"indexRangeFilters":false,
"indexSearchable":true,
"name":"content",
"tokenization":"word"
}
],
"replicationConfig":{
"asyncEnabled":true,
"deletionStrategy":"NoAutomatedResolution",
"factor":1
},
"shardingConfig":{
"virtualPerPhysical":128,
"desiredCount":1,
"actualCount":1,
"desiredVirtualCount":128,
"actualVirtualCount":128,
"key":"_id",
"strategy":"hash",
"function":"murmur3"
},
"vectorIndexConfig":{
"skip":false,
"cleanupIntervalSeconds":300,
"maxConnections":64,
"efConstruction":128,
"ef":-1,
"dynamicEfMin":100,
"dynamicEfMax":500,
"dynamicEfFactor":8,
"vectorCacheMaxObjects":1000000000000,
"flatSearchCutoff":40000,
"distance":"cosine",
"pq":{
"enabled":false,
"bitCompression":false,
"segments":0,
"centroids":256,
"trainingLimit":100000,
"encoder":{
"type":"kmeans",
"distribution":"log-normal"
}
},
"bq":{
"enabled":false
},
"sq":{
"enabled":false,
"trainingLimit":100000,
"rescoreLimit":20
},
"filterStrategy":"sweeping"
},
"vectorIndexType":"hnsw",
"vectorizer":"none"
}
Use this operation to delete a collection.
Required Parameters
Use this operation to list all the objects of a collection.
Required Parameter
Optional Parameter
{
"deprecations":[],
"objects":[{
"class":"Testcollection",
"creationTimeUnix":1739009190787,
"id":"296f9f17-628a-463a-b273-6ae369a3bb59",
"lastUpdateTimeUnix":1739009190787,
"properties":{
"content":"This is a test document stored in Weaviate.",
"title":"New Sample Document"
},
"vectorWeights":null
},
{
"class":"Testcollection",
"creationTimeUnix":1738941448311,
"id":"550e8400-e29b-41d4-a716-446655440000",
"lastUpdateTimeUnix":1738941448311,
"properties":{
"content":"This is a test document stored in Weaviate.",
"title":"Sample Document"
},
"vectorWeights":null
},
{
"class":"Testcollection",
"creationTimeUnix":1739008896994,
"id":"98a6628d-f07d-4f56-b64b-1b818201095c",
"lastUpdateTimeUnix":1739008896994,
"properties":{
"content":"This is a test document stored in Weaviate.",
"title":"Sample Document"
},
"vectorWeights":null
}],
"totalResults":3
}
Use this operation to create a new object within the selected collection.
Required Parameters
Optional Parameter
{
"class":"Testcollection",
"creationTimeUnix":1739009190787,
"id":"296f9f17-628a-463a-b273-6ae369a3bb59",
"lastUpdateTimeUnix":1739009190787,
"properties":{
"content":"This is a test document stored in Weaviate.",
"title":"New Sample Document"
},
"vector":[0.12345,0.12345,.......,0.12345,0.12345]
}
Use this operation to fetch an object using it's ID.
Required Parameters
{
"class":"Testcollection",
"creationTimeUnix":1738941448311,
"id":"550e8400-e29b-41d4-a716-446655440000",
"lastUpdateTimeUnix":1738941448311,
"properties":{
"content":"This is a test document stored in Weaviate.",
"title":"Sample Document"
},
"vectorWeights":null
}
Use this operation to delete the object using it's ID.
Required Parameters