zoukankan      html  css  js  c++  java
  • ES与关系型数据库的通俗比较

    1、在Elasticsearch中,文档归属于一种类型(type),而这些类型存在于索引(index)中,我们可以画一些简单的对比图来类比传统关系型数据库:

    Relational DB -> Databases -> Tables -> Rows -> Columns

    Elasticsearch -> Indices -> Types -> Documents -> Fields

    即:Elasticsearch集群可以包含多个索引(indices)(数据库),每一个索引可以包含多个类型(types)(表),每一个类型包含多个文档(documents)(行),然后每个文档包含多个字段(Fields)(列)。

    例如在kibana中的Dev Tool中查询:

    //查指定userId

    GET /risk_merchant_his/_search
    {"query":{
      "bool" : {
        "must" : [
          {
          "term" : {
            "userId" : {
              "value" : 109530,
              "boost" : 1.0
              }
            }
          }
        ],
        "adjust_pure_negative" : true,
        "boost" : 1.0
        }
      }
    }

    //查全量数据

    GET /risk_order_his/_search
    {"query":{
    "bool" : {
    "must" : [
    {
    "match_all": {

    }
    }

    ],
    "adjust_pure_negative" : true,
    "boost" : 1.0
    }
    }
    }

  • 相关阅读:
    GCC默认的标准不是ANSI C,而是GNU C90
    C/C++预定义宏
    GCC对C标准的支持
    Tupper's selfreferential formula
    VC++对C标准的支持
    一道笔试题
    C语言标准
    FLVPlayback视频
    getDefinitionByName与ApplicationDomain.getDefinition
    SVN
  • 原文地址:https://www.cnblogs.com/wzk-0000/p/12059495.html
Copyright © 2011-2022 走看看