我正在处理一个包含多个字段的数据集。我需要同时对几个字段进行搜索。Weaviate与现场搜索兼容吗?如果是这样的话,如果您能指导我如何组合多个搜索查询,我将不胜感激。
这是一个计划:
schema = {
"classes": [{
"class": "Post",
"vectorizer": "none", # explicitly tell Weaviate not to vectorize anything, we are providing the vectors ourselves through our BERT model
"properties": [{
"name":"pmid",
"dataType": ["int"],
},
{
"name":"title",
"dataType": ["text"],
},
{
"name": "body",
"dataType": ["text"],
},
{
"name":"summary",
"dataType": ["text"],
}]
}]
}我想同时搜索身体和总结。例如,它确定了在其正文和摘要中使用“艾滋病毒”一词的出版物。
发布于 2022-02-02 16:47:21
这当然是可能的。查看Weaviate文档中的where-filter :-)
基于示例架构的示例。
{
Get {
Post(
nearVector: {
vector: [0, 0, 0] # <== your custom vector
}
where: { # <== searching for a pmid > 12
operator: GreaterThan
valueInt: 12
path: ["pmid"]
}
) {
pmid
title
}
}
}https://stackoverflow.com/questions/70943339
复制相似问题