在elassandra 6.0+版本中感到困惑

pokxtpni  于 2021-06-10  发布在  Cassandra
关注(0)|答案(0)|浏览(231)

im使用cassandra 3.1和cassandra 6.8
因此,与elastic search v6.0+一样,索引就像

PUT twitter
{
  "mappings": {
    "doc": {
      "properties": {
        "type": { "type": "keyword" }, 
        "name": { "type": "text" },
        "user_name": { "type": "keyword" },
        "email": { "type": "keyword" },
        "content": { "type": "text" },
        "tweeted_at": { "type": "date" }
      }
    }
  }
}

PUT twitter/doc/user-kimchy
{
  "type": "user", 
  "name": "Shay Banon",
  "user_name": "kimchy",
  "email": "shay@kimchy.com"
}

PUT twitter/doc/tweet-1
{
  "type": "tweet", 
  "user_name": "kimchy",
  "tweeted_at": "2017-10-24T09:00:00Z",
  "content": "Types are going away"
}

GET twitter/_search
{
  "query": {
    "bool": {
      "must": {
        "match": {
          "user_name": "kimchy"
        }
      },
      "filter": {
        "match": {
          "type": "tweet" 
        }
      }
    }
  }
}

我真的很困惑,有一些问题,所以这意味着
为所有表2只保留一个索引,所以如果需要添加新的表字段,这是否会删除新的put index命令上的旧数据?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题