如果 Vespa 查询超时,部分结果
Partial results if a Vespa-query times out
如果结果集中的一个文档是一个巨大的文档(几 MB),那么:
- 查询超时(看起来查询速度很快 - 但使用
summary: dynamic
创建片段超时)
children: [...]
只包含垃圾信息
这些解决方案中的一种可行吗?
- 如果 Vespa 无法回答
field: [...]
,它至少应该回答文档 ID,例如id: "id:post:post::12345"
而不是 id: "index/content/0/..."
- 只有大文档的片段应该超时(目前所有
children: [...]
return "id": "index/content/..."
)
示例:
{
"root": {
"id": "toplevel",
"relevance": 1,
"fields": {
"totalCount": 60
},
"coverage": {
"coverage": 100,
"documents": 1427628,
"full": true,
"nodes": 2,
"results": 2,
"resultsFull": 2
},
"errors": [
{
"code": 12,
"summary": "Timed out",
"message": "timeout waiting for summaries from sc0.num0"
}
],
"children": [
{
"id": "index:content/0/939fc4e6c4c9576cd77a12f3",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/45ee850d113ea6e6c42f2f9f",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/b9fcf825622f9ec8c0ea4e4d",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/1e1c4a96617fa6571c3c5ce7",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/2550e74ff60e88710f1f4f26",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/d1dd0fb89cea4613132a76f6",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/92a8c4abe0e358e3dab36fbb",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/bc36fea47a7628648d89e1b0",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/804475ba69aaa691de930e10",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/0577e69b0824684948027fc3",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/1b1f1144aa80385aca9a6027",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/34f8ddeca987fe2d77069009",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/f1befbe5d773e19811790e11",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/af2e009dd5ab895b1e3f9ff1",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/862f42f5c322642198b1f267",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/6d1fb4c45beb641fe1ce17ec",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/f9797f6e747b33b992faffb3",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/6a3e15cfab492c4a428ad529",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/9eb6407921012c10deb70115",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/905360bc8da5ff1b0b452246",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/24277dd2eef4167cec1bcf8a",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a207cf989e02b1443d662cf1",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/bae6cb8b6e9fbc1032cb1ee4",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/24b0cd6cd7251074a9dea836",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/95b0f46b8fa9d22d497b08fc",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/41d534f99d1a27f6a0d2032b",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/c13287b86341bfbddda08b3a",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/59874c4cbff45ac155da5b11",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/28a1e4e530064836716e8175",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/8ebdc951376c0a82cafee577",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/79bcd638b357820e6f8ac10d",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/866db8cd10611dbc898fe5ec",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a1444ef7d27205b34c60ff25",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/c82d1c8b0a134413203dde58",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/29c349724f46f9c1a7448eab",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/96f0f6cb2789f521c71318ca",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/b5b8046218c23d4c08fea8a7",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/2d4f7cf4e3c8d57e8dc7b401",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/562104630c6a15a001b0718c",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/dac419d3bcc45e7422548e74",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/9a4bb96ea031b3891a7f8d12",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/9b67994ac2d440bd6ac69d19",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a7dbbc02b8889271441dfdc4",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/acdc61985bbdc43ca5cfaf56",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a1429d9aa68422e0384f682e",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/11b0377300156b23c5a893fa",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/6d8075a57eef79a9f7060989",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/565b12cee0eccded7f384fb1",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/93c46b96dccd2ed8e52c6ae4",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/26acfa4c314761921da624a4",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/c99f784fa9d31a93c7b72ef0",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/88099aad4415647d62d705d9",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/b80c189a7e125a17a04c703e",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/3dea2a9e7e13211c0706e846",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/f1bdfae364ff4ad2bfee6236",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/7cc8a3c625ce3a11383c6157",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/44ddd465721f9dbf66f15f64",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/53d09e41a0a488c9ceffd4d7",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/76b024d20a1a78e255420e80",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a4ddfd13bd4cace8984f90dc",
"relevance": 0,
"source": "content"
}
]
}
}
一般:
预计为大型文档生成片段不会花费那么长的时间 - 有问题的文档有多大?超时前经过了多少时间? (您可以通过在查询中添加例如 &tracelevel=5 来查找计时详细信息。
snippets中绝对不会出现垃圾信息,能举个例子吗?您确定这不是客户端问题吗?
针对您的具体问题:
ID 是摘要的一部分,因此如果摘要请求失败,它无法立即为您提供完整的 ID。如果您愿意,您可以自己执行此操作,方法是将 id 放在不同的摘要 class 中并首先请求(来自搜索者对不同的摘要 class 进行两次 "fill" 调用)。
每个分区节点都有一个摘要请求(通常针对多个 ID)。当您接近超时时,可以 return 我们拥有的内容,但据我记得,我们今天不会对摘要请求执行此操作。
无论如何,在考虑解决方法之前,让我们先找出原因,我不记得以前任何应用程序都有这个问题。我建议你在 https://github.com/vespa-engine/vespa/issues 创建一个问题,因为它更适合这样做。
如果结果集中的一个文档是一个巨大的文档(几 MB),那么:
- 查询超时(看起来查询速度很快 - 但使用
summary: dynamic
创建片段超时) children: [...]
只包含垃圾信息
这些解决方案中的一种可行吗?
- 如果 Vespa 无法回答
field: [...]
,它至少应该回答文档 ID,例如id: "id:post:post::12345"
而不是id: "index/content/0/..."
- 只有大文档的片段应该超时(目前所有
children: [...]
return"id": "index/content/..."
)
示例:
{
"root": {
"id": "toplevel",
"relevance": 1,
"fields": {
"totalCount": 60
},
"coverage": {
"coverage": 100,
"documents": 1427628,
"full": true,
"nodes": 2,
"results": 2,
"resultsFull": 2
},
"errors": [
{
"code": 12,
"summary": "Timed out",
"message": "timeout waiting for summaries from sc0.num0"
}
],
"children": [
{
"id": "index:content/0/939fc4e6c4c9576cd77a12f3",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/45ee850d113ea6e6c42f2f9f",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/b9fcf825622f9ec8c0ea4e4d",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/1e1c4a96617fa6571c3c5ce7",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/2550e74ff60e88710f1f4f26",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/d1dd0fb89cea4613132a76f6",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/92a8c4abe0e358e3dab36fbb",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/bc36fea47a7628648d89e1b0",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/804475ba69aaa691de930e10",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/0577e69b0824684948027fc3",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/1b1f1144aa80385aca9a6027",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/34f8ddeca987fe2d77069009",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/f1befbe5d773e19811790e11",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/af2e009dd5ab895b1e3f9ff1",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/862f42f5c322642198b1f267",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/6d1fb4c45beb641fe1ce17ec",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/f9797f6e747b33b992faffb3",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/6a3e15cfab492c4a428ad529",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/9eb6407921012c10deb70115",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/905360bc8da5ff1b0b452246",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/24277dd2eef4167cec1bcf8a",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a207cf989e02b1443d662cf1",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/bae6cb8b6e9fbc1032cb1ee4",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/24b0cd6cd7251074a9dea836",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/95b0f46b8fa9d22d497b08fc",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/41d534f99d1a27f6a0d2032b",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/c13287b86341bfbddda08b3a",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/59874c4cbff45ac155da5b11",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/28a1e4e530064836716e8175",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/8ebdc951376c0a82cafee577",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/79bcd638b357820e6f8ac10d",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/866db8cd10611dbc898fe5ec",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a1444ef7d27205b34c60ff25",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/c82d1c8b0a134413203dde58",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/29c349724f46f9c1a7448eab",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/96f0f6cb2789f521c71318ca",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/b5b8046218c23d4c08fea8a7",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/2d4f7cf4e3c8d57e8dc7b401",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/562104630c6a15a001b0718c",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/dac419d3bcc45e7422548e74",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/9a4bb96ea031b3891a7f8d12",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/9b67994ac2d440bd6ac69d19",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a7dbbc02b8889271441dfdc4",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/acdc61985bbdc43ca5cfaf56",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a1429d9aa68422e0384f682e",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/11b0377300156b23c5a893fa",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/6d8075a57eef79a9f7060989",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/565b12cee0eccded7f384fb1",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/93c46b96dccd2ed8e52c6ae4",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/26acfa4c314761921da624a4",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/c99f784fa9d31a93c7b72ef0",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/88099aad4415647d62d705d9",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/b80c189a7e125a17a04c703e",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/3dea2a9e7e13211c0706e846",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/f1bdfae364ff4ad2bfee6236",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/7cc8a3c625ce3a11383c6157",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/44ddd465721f9dbf66f15f64",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/53d09e41a0a488c9ceffd4d7",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/76b024d20a1a78e255420e80",
"relevance": 0,
"source": "content"
},
{
"id": "index:content/0/a4ddfd13bd4cace8984f90dc",
"relevance": 0,
"source": "content"
}
]
}
}
一般:
预计为大型文档生成片段不会花费那么长的时间 - 有问题的文档有多大?超时前经过了多少时间? (您可以通过在查询中添加例如 &tracelevel=5 来查找计时详细信息。
snippets中绝对不会出现垃圾信息,能举个例子吗?您确定这不是客户端问题吗?
针对您的具体问题:
ID 是摘要的一部分,因此如果摘要请求失败,它无法立即为您提供完整的 ID。如果您愿意,您可以自己执行此操作,方法是将 id 放在不同的摘要 class 中并首先请求(来自搜索者对不同的摘要 class 进行两次 "fill" 调用)。
每个分区节点都有一个摘要请求(通常针对多个 ID)。当您接近超时时,可以 return 我们拥有的内容,但据我记得,我们今天不会对摘要请求执行此操作。
无论如何,在考虑解决方法之前,让我们先找出原因,我不记得以前任何应用程序都有这个问题。我建议你在 https://github.com/vespa-engine/vespa/issues 创建一个问题,因为它更适合这样做。