首页 > 其他 > 详细

kibana操作

时间:2020-01-22 12:17:33      阅读:83      评论:0      收藏:0      [点我收藏+]

一些KIBANA的操作,记录下,免下次重复写

PUT kb_question
{
  "mappings": {
    "kb_question": {
      "properties": {
        "content": {
          "type": "text",
          "analyzer": "ik_max_word",
          "search_analyzer": "ik_max_word"
        },
        "topic": {
          "type": "text",
          "analyzer": "ik_max_word",
          "search_analyzer": "ik_max_word"
        },
        "like": {
          "type": "integer"
        },
        "read": {
          "type": "integer"
        },
        "user_id": {
          "type": "integer"
        },
        "user": {
          "type": "text"
        },
        "tm": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        }
      }
    }
  }
}

POST kb_question/kb_question/
{
  "user": "xiqing",
  "user_id": "704981",
  "topic": "test test",
  "content": "ccccccccccccccc la la lala la la la la la!!",
  "read": "0",
  "like": "0",
  "tm": "2019-1-20 15:45:00"
}

GET_cat/indices/kb_question#DELETE/kb_questionPUTkb_answer
{
  "mappings": {
    "kb_answer": {
      "properties": {
        "user": {
          "type": "text"
        },
        "q_id": {
          "type": "integer"
        },
        "answer": {
          "type": "text",
          "analyzer": "ik_max_word",
          "search_analyzer": "ik_max_word"
        },
        "like": {
          "type": "integer"
        },
        "tm": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        }
      }
    }
  }
}

GET_cat/indices/kb_answerPOSTkb_answer/kb_answer/{
  "user": "xiqing",
  "q_id": "888",
  "answer": "answer2 answer2 answer2 answer2 answer2!!",
  "like": 0,
  "tm": "2019-1-21 18:45:00"
}

 

结束

kibana操作

原文:https://www.cnblogs.com/cwind/p/12228196.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!