我开始测试ArangoSearch在即将到来的特性中的使用。我有一个嵌套的JSON字段,我想对嵌套字段进行令牌搜索。
{ip:{dpdm:{description:<text>}}}
意见如下:
{
"writebufferIdle": 64,
"type": "arangosearch",
"writebufferSizeMax": 33554432,
"consolidationPolicy": {
"type": "tier",
"segmentsBytesFloor": 2097152,
"segmentsBytesMax": 5368709120,
"segmentsMax": 10,
"segmentsMin": 1,
"minScore": 0
},
"primarySort": [],
"globallyUniqueId": "h7437427BB0F0/26371461",
"id": "26371461",
"storedValues": [],
"writebufferActive": 0,
"consolidationIntervalMsec": 1000,
"cleanupIntervalStep": 2,
"commitIntervalMsec": 1000,
"links": {
"pmconfig": {
"analyzers": [
"identity"
],
"fields": {
"ip.dpdm.version_notes": {
"analyzers": [
"text_en"
]
},
"ip.digital.feature_list": {
"analyzers": [
"text_en"
]
},
"ip.common.Available-Views": {
"analyzers": [
"text_en"
]
},
"ip.pipeline.comment": {
"analyzers": [
"text_en"
]
},
"ip.dpdm.eccn": {
"analyzers": [
"text_en"
]
},
"ip.dpdm.description": {
"analyzers": [
"text_en"
]
},
"ip.dpdm.maturity_comments": {
"analyzers": [
"text_en"
]
}
},
"includeAllFields": true,
"storeValues": "none",
"trackListPositions": false
}
},
"primarySortCompression": "lz4"
}以下查询返回58个对象:for d in pmconfig filter d.ip.dpdm.description like('% synchronous %') return d
但以下内容不返回任何项:for d in v_myView search analyzer(d.ip.dpdm.description in tokens('synchronous', 'text_en'), 'text_en') return d
我肯定我做错了什么,但在我看来是对的。给我一个指针让我走会很感激的。
发布于 2022-05-28 18:38:20
我就知道我错过了什么。在指定视图时,我似乎不应该使用嵌套字段路径。我所需要做的就是在视图中将顶级字段"ip“设置为"text_en”分析器。现在一切都好了。
https://stackoverflow.com/questions/72379553
复制相似问题