Elasticsearch 的交互库 Elastomer-Client

码农软件 · 软件分类 · 常用工具包 · 2019-08-17 20:14:45

软件介绍

Elastomer-Client 为 ElasticSearch API endpoint 提供一个一对一的映射。API 通过你想要实现的来分解为逻辑部分和访问,每一个逻辑部分代表一个客户端类。

示例代码:

require 'elastomer/client'
client = Elastomer::Client.new

index = client.index('twitter')
index.create(
 :settings => { 'index.number_of_shards' => 3 },
 :mappings => {
 :tweet => {
 :_source => { :enabled => true },
 :_all    => { :enabled => false },
 :properties => {
 :author => { 
 :type => 'string',
 :index => 'not_analyzed' },
 :tweet  => { :type => 'string', :analyze => 'standard' }
      }
    }
  }
)

index.exists?

index.exists? :type => 'tweet'index.delete

本文地址:https://codercto.com/soft/d/12589.html

Linux程序设计

Linux程序设计

Neil Matthew、Richard Stones / 陈健、宋健建 / 人民邮电出版社 / 201005 / 99.00元

时至今日,Linux系统已经从一个个人作品发展为可以用于各种关键任务的成熟、高效和稳定的操作系统,因为具备跨平台、开源、支持众多应用软件和网络协议等优点,它得到了各大主流软硬件厂商的支持,也成为广大程序设计人员理想的开发平台。 本书是Linux程序设计领域的经典名著,以简单易懂、内容全面和示例丰富而受到广泛好评。中文版前两版出版后,在国内的Linux爱好者和程序员中也引起了强烈反响,这一热潮......一起来看看 《Linux程序设计》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具
html转js在线工具

html转js在线工具