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

Python机器学习

Python机器学习

[美] Michael Bowles / 沙嬴、李鹏 / 人民邮电出版社 / 2016-12 / 69.00元

在学习和研究机器学习的时候,面临令人眼花缭乱的算法,机器学习新手往往会不知 所措。本书从算法和Python 语言实现的角度,帮助读者认识机器学习。 书专注于两类核心的“算法族”,即惩罚线性回归和集成方法,并通过代码实例来 展示所讨论的算法的使用原则。全书共分为7 章,详细讨论了预测模型的两类核心算法、预测模型的构建、惩罚线性回归和集成方法的具体应用和实现。 本书主要针对想提......一起来看看 《Python机器学习》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

MD5 加密
MD5 加密

MD5 加密工具

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

html转js在线工具