代码之家  ›  专栏  ›  技术社区  ›  mel

存储术语向量时,参数“store”是必需的吗?

  •  2
  • mel  · 技术社区  · 8 年前

    我想存储场的项向量,但我心里有疑问。他们在文件中说:

    "mappings": {
        "tweet": {
          "properties": {
            "text": {
              "type": "text",
              "term_vector": "with_positions_offsets_payloads",
              "store" : true,
              "analyzer" : "fulltext_analyzer"
             }
          }
        }
      }
    

    /twitter/tweet/1/_termvectors
    

    存储的是字段 text . 那么,如果我想存储项向量,而不是字段呢 文本 . 如果我不指定,它会存储项向量吗 "store":true ? 我如何确定我的项向量是存储的,而不是动态计算的?

    2 回复  |  直到 8 年前
        1
  •  1
  •   dshockley    8 年前

    术语向量将在以下情况下存储: term_vector 在映射中指定(具有除 no term_vector docs --这里的示例映射不包括 "store":true ,文档明确表示将存储术语向量。

        2
  •  1
  •   Karsten R.    8 年前

    你的问题是关于lucene特征的差异

    https://de.slideshare.net/lucenerevolution/what-is-inaluceneagrandfinal

    只有反向索引用于搜索(可能的,例如 position

    可选文档值可用于排名