I am writing a text dataType to Weaviate using the typescript client with a schema like this:
{
dataType: ["text[]"], // not serialized by this app
description: "document.botQuestions",
name: "botQuestions",
moduleConfig: {
"text2vec-openai": { // this must match the vectorizer used
skip: false, // DO vectorize this property to allow question matching
vectorizePropertyName: false,
},
},
},
The above is just part of the schema, there are a bunch of text objects as well. The botQuestions object is an array of strings. For some reason when I retrieve this property from Weaviate, an empty array is returned. I also get this error:
“invalid text property ‘botQuestions’ on class ‘WeaviateDocs’: not a string, but interface {}”
I’ve confirmed that when written (using withObject()) botQuestions is an array of strings, and the overall object that botQuestions is part of is written and retrieved fine.
documents.forEach((document) => {
const obj = {
class: className,
// write the Document interface to weaviate - client reading it expects that
properties: {
url: document.url,
title: document.title,
botLed: document.botLed,
botQuestions: document.botQuestions,
role: document.role,
text: document.text,
// Weaviate only accepts strings, so we convert here and
// then convert back to object in page2svelteKit
codeArray: JSON.stringify(document.codeArray),
},
};
So I’m assuming there is something special about the text type. Is there some special formatting required? Does it need to be serialized? (if so this seems to defeat the purpose of having an array text type).
I’m using weavite-ts-client 1.5, and Weaviate managed cluster 1.20.3