Weaviate 中的 Graphql 查询过滤器

Graphql query filter in Weaviate

我似乎不知道如何查询 Weaviate 并过滤掉不需要的对象。 我已阅读:https://graphql.org/learn/queries/#arguments

我认为这会转化为我使用邮递员进行的测试:

{ 
  "query": "{ 
    Get { 
      Things { 
        Technique(name: "some name of technique in the weaviate") { name, uuid } 
      } 
    } 
  }"
} 

我收到的结果:

{
  "code": 400,
  "message": "parsing body body from \"\" failed, because invalid character 's' after object key:value pair"
}

这应该如何工作?

要过滤掉 Weaviate 中的对象,您必须使用 "where" 过滤器。看这里:https://www.semi.technology/documentation/weaviate/current/query-data/filters.html#where-filter

我认为您在 GrapiQL 中的查询看起来像这样:

{"query": "{ Get { Things { Technique ( where: { path: ["name"], operator: Equal, valueSting: "some name of technique in the weaviate"} ) { name, uuid } } } }" }

对于 rest POST 请求中的 JSON 正文,它看起来像这样(转义双引号):

{"query": "{ Get { Things { Technique ( where: { path: [\"name\"], operator: Equal, valueSting: \"some name of technique in the weaviate\"} ) { name, uuid } } } }" }