首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Weaviate向量型

Weaviate向量型
EN

Stack Overflow用户
提问于 2022-10-24 16:01:49
回答 1查看 46关注 0票数 0

是否有可能改变向量的数据类型?例如,当我试图将以下对象保存到/批/对象时

代码语言:javascript
复制
{
    "fields": [
        "ALL"
    ],
    "objects": [
        {
            "id": "1112a0911b90de8277fc3fb45c97d3c3",
            "vector": [
              0.11111111111122222
            ],
            "class": "Test"
        }
    ]
}

只有0.11111111被保存为向量,我想是因为数据类型是float32

EN

回答 1

Stack Overflow用户

发布于 2022-11-01 12:29:00

我认为您已经将向量设置为正常的数据类型。

正如您在下面的示例(来自这个演示数据集)中所看到的,您可以看到,您所称的objects实际上有一个对象properties。在properties中,您似乎已经将向量设置为数组。

文档中的这个Weaviate核心知识科也可能是有用的。

代码语言:javascript
复制
{
    "class": "Article",
    "creationTimeUnix": 1664505085008,
    "id": "000e4e5f-40a8-3981-ba08-2407c92efa6c",
    "lastUpdateTimeUnix": 1664505086123740200,
    "properties": {
        "inPublication": [
            {
                "beacon": "weaviate://localhost/16476dca-59ce-395e-b896-050080120cd4",
                "href": "/v1/objects/16476dca-59ce-395e-b896-050080120cd4"
            }
        ],
        "summary": "Mission accomplished for Florida International's James Morgan, Charlotte's Benny LeMay and Navy's Malcolm Perry in the East-West Shrine Bowl. The trio shined for the East in a 31-27 victory, with Morgan leading two first-quarter touchdown drives and LeMay rushing for a pair of TDs, including the game-winner. Perry took a direct snap from center and sprinted 52 yards for a TD on his only carry. Robinson, who rushed for 1,899 yards and 18 touchdowns for Illinois State this season, finished with 80 yards rushing on seven attempts. Stevens also had an 18-yard completion to Rhode Island's Aaron Parker to set up LeMay's second touchdown.",
        "title": "LeMay's 2 TDs lead East over West 31-27 in Shrine Bowl",
        "url": "http://www.foxnews.com/sports/lemays-2-tds-lead-east-over-west-31-27-in-shrine-bowl",
        "wordCount": 411
    },
    "vector": [
        -0.09015006,
        0.11759494,
        0.024284547,
        // etc   
    ]
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74183834

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档