首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >新手ArangoSearch与对象属性

新手ArangoSearch与对象属性
EN

Stack Overflow用户
提问于 2022-05-25 14:30:59
回答 1查看 23关注 0票数 0

我开始测试ArangoSearch在即将到来的特性中的使用。我有一个嵌套的JSON字段,我想对嵌套字段进行令牌搜索。

{ip:{dpdm:{description:<text>}}}

意见如下:

代码语言:javascript
复制
{
  "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

我肯定我做错了什么,但在我看来是对的。给我一个指针让我走会很感激的。

EN

回答 1

Stack Overflow用户

发布于 2022-05-28 18:38:20

我就知道我错过了什么。在指定视图时,我似乎不应该使用嵌套字段路径。我所需要做的就是在视图中将顶级字段"ip“设置为"text_en”分析器。现在一切都好了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72379553

复制
相关文章

相似问题

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