Dhanapandi
06/20/2024, 9:46 AMschema = {
"name": "demo",
"fields": [
{"name": "fdcId", "type": "string"},
{"name": "topThree", "type": "string[]"},
{"name": "dataType", "type": "string","sort":True},
{"name": "description", "type": "string", "token_separators": [",", "."]},
{"name": "servingSize", "type": "string","index":False},
{"name": "servingSizeUnit", "type": "string","index":False},
{"name": "nutrient_tags", "type": "string[]","index":True},
{"name": "ingredient_tags", "type": "string[]","index":True},
{"name": "ingredients", "type": "string","index":True},
{"name": "nutrients", "type": "auto","index":False},
{"name": ".*", "type": "auto"},
{
"name" : "embedding",
"type" : "float[]",
"embed": {
"from": [
"dataType",
"description",
"servingSize",
"servingSizeUnit",
"ingredients",
"ingredient_tags",
"nutrient_tags"
],
"model_config": {
"model_name": "ts/e5-small"
}
}
},
],
}
with open('output_branded.jsonl') as jsonl_file:
client.collections['Foods'].documents.import_(jsonl_file.read().encode('utf-8'), {'action': 'upsert','batch_size': 100})
after sometime the server throws error it becomes unresponsive I have also attached the logsDhanapandi
06/20/2024, 9:51 AMKishore Nallan
06/20/2024, 10:37 AM