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

C语言点滴

C语言点滴

赵岩 / 人民邮电出版社 / 2013-10-1 / 45.00元

C语言兼具高级语言和汇编语言的特点,学习起来难度较大,令不少初学者望而生畏。同时,C语言又是一门应用非常广泛的编程语言,在实际应用中如何根据不同的应用场景高效地使用C语言,也是大家非常感兴趣的话题。  《C语言点滴》精心选取C语言一些必备知识,这也是初学者容易搞不清楚、犯错误的知识点,进行深入地分析和介绍,以期帮助读者清除C语言学习之路上的“绊脚石”,降低初学入门的难度,培养继续深入的兴趣。  全......一起来看看 《C语言点滴》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具