zoukankan      html  css  js  c++  java
  • ElasticSearch 多索引

    1、用逗号将索引隔开,如:
    $ curl -XPOST http://localhost:9200/aaa,website/_search/
    
    {
    
    • "took"1,
    • "timed_out"false,
    • "_shards": {
      • "total"10,
      • "successful"10,
      • "failed"0
      },
    • "hits": {
      • "total"5,
      • "max_score"1,
      • "hits": [
        • {
          • "_index""website",
          • "_type""blog",
          • "_id""123",
          • "_score"1,
          • "_source": {
            • "title""My first blog entry",
            • "text""Just trying this out...",
            • "date""2014/01/01"
            }
          },
        • {
          • "_index""website",
          • "_type""blog",
          • "_id""AVbkih8AltSLRRB7XAun",
          • "_score"1,
          • "_source": {
            • "title""TestTitle",
            • "text""text",
            • "date""2016/09/01"
            }
          },
        • {
          • "_index""website",
          • "_type""blog",
          • "_id""AVbf1AtSyvALLDk8cjpY",
          • "_score"1,
          • "_source": {
            • "title""My 3 blog entry",
            • "text""Still trying this out...",
            • "date""2014/01/01"
            }
          },
        • {
          • "_index""aaa",
          • "_type""aaa",
          • "_id""AVcCopjQzgrwoUDkEMu3",
          • "_score"1,
          • "_source": {
            • "str1""hello",
            • "str2""world"
            }
          },
        • {
          • "_index""aaa",
          • "_type""aaa",
          • "_id""AVcCogrMzgrwoUDkEMu2",
          • "_score"1,
          • "_source": {
            • "str1""hello, world!",
            • "str2""goodbye! world"
            }
          }
        ]
      }

    }

    2、通配符

    elasticsearch还支持使用统配的风格,如使用*匹配任意字符。

    3、数学表达式风格

    最后可以通过add(+)添加一个索引,使用remove(-)去掉一个索引

  • 相关阅读:
    【js效果】密码的显示和隐藏
    【js效果】竖向折叠二级菜单
    【js效果】单行文字滚动(从左到右)
    mysql:查询排名
    init_bootmem_node
    bootmem_init_node
    for_each_node(node)
    build_mem_type_table
    __vet_atags
    asm-offset.h 生成
  • 原文地址:https://www.cnblogs.com/pilihaotian/p/8823137.html
Copyright © 2011-2022 走看看