zoukankan      html  css  js  c++  java
  • kibana操作

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

    #创建索引名为kb_question的索引,并添加mapping,即各字段属性
    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" }

    结束

  • 相关阅读:
    mysql 快速生成百万条测试数据
    DEV SIT UAT
    云计算的三层SPI模型
    go的下载
    redis主从 哨兵
    Mybatis 插入操作时获取主键 (Oracle 触发器与SEQ)
    oracle创建表空间
    mycat源码分析
    js判断是否是数字通用写法
    spring aop获取目标对象的方法对象(包括方法上的注解)
  • 原文地址:https://www.cnblogs.com/cwind/p/12228196.html
Copyright © 2011-2022 走看看