curl命令数据

curl -XPUT http://127.0.0.1:9200/us/user/1 -d "{\"email\":\"john@smith.com\",\"name\":\"John Smith\",\"username\":\"@john\"}"

curl -XPUT http://127.0.0.1:9200/gb/user/2 -d "{\"email\" : \"mary@jones.com\",\"name\" : \"Mary Jones\",\"username\" : \"@mary\"}"

curl -XPUT http://127.0.0.1:9200/gb/tweet/3 -d "{\"date\" : \"2014-09-13\",\"name\" : \"Mary Jones\",\"tweet\" : \"Elasticsearch means full text search has never been so easy\",\"user_id\" : 2}"

curl -XPUT http://127.0.0.1:9200/us/tweet/4 -d "{\"date\" : \"2014-09-14\",\"name\" : \"John Smith\",\"tweet\" : \"@mary it is not just text, it does everything\",\"user_id\" : 1}"

curl -XPUT http://127.0.0.1:9200/gb/tweet/5 -d "{\"date\" : \"2014-09-15\",\"name\" : \"Mary Jones\",\"tweet\" : \"However did I manage before Elasticsearch?\",\"user_id\" : 2}"

curl -XPUT http://127.0.0.1:9200/us/tweet/6 -d "{\"date\" : \"2014-09-16\",\"name\" : \"John Smith\",\"tweet\" : \"The Elasticsearch API is really easy to use\",\"user_id\" : 1}"

curl -XPUT http://127.0.0.1:9200/gb/tweet/7 -d "{\"date\" : \"2014-09-17\", \"name\" : \"Mary Jones\",\"tweet\" : \"The Query DSL is really powerful and flexible\",\"user_id\" : 2}"

curl -XPUT http://127.0.0.1:9200/us/tweet/8 -d "{\"date\" : \"2014-09-18\",\"name\" : \"John Smith\",\"user_id\" : 1}"

curl -XPUT http://127.0.0.1:9200/gb/tweet/9 -d "{\"date\" : \"2014-09-19\",\"name\" : \"Mary Jones\",\"tweet\" : \"Geo-location aggregations are really cool\",\"user_id\" : 2}"

curl -XPUT http://127.0.0.1:9200/us/tweet/10 -d "{\"date\" : \"2014-09-20\",\"name\" : \"John Smith\",\"tweet\" : \"Elasticsearch surely is one of the hottest new NoSQL products\",\"user_id\" : 1}"

curl -XPUT http://127.0.0.1:9200/gb/tweet/11 -d "{\"date\" : \"2014-09-21\",\"name\" : \"Mary Jones\",\"tweet\" : \"Elasticsearch is built for the cloud, easy to scale\",\"user_id\" : 2}"

curl -XPUT http://127.0.0.1:9200/us/tweet/12 -d "{\"date\" : \"2014-09-22\",\"name\" : \"John Smith\",\"tweet\" : \"Elasticsearch and I have left the honeymoon stage, and I still love her.\",\"user_id\" : 1}"

curl -XPUT http://127.0.0.1:9200/gb/tweet/13 -d "{\"date\" : \"2014-09-23\",\"name\" : \"Mary Jones\",\"tweet\" : \"So yes, I am an Elasticsearch fanboy\",\"user_id\" : 2}"

curl -XPUT http://127.0.0.1:9200/us/tweet/14 -d "{\"date\" : \"2014-09-24\",\"name\" : \"John Smith\",\"tweet\" : \"How many more cheesy tweets do I have to write?\",\"user_id\" : 1}"

批量操作数据

POST /_bulk
{ "create": { "_index": "us", "_type": "user", "_id": "" }}
{ "email" : "john@smith.com", "name" : "John Smith", "username" : "@john" }
{ "create": { "_index": "gb", "_type": "user", "_id": "" }}
{ "email" : "mary@jones.com", "name" : "Mary Jones", "username" : "@mary" }
{ "create": { "_index": "gb", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-13", "name" : "Mary Jones", "tweet" : "Elasticsearch means full text search has never been so easy", "user_id" : }
{ "create": { "_index": "us", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-14", "name" : "John Smith", "tweet" : "@mary it is not just text, it does everything", "user_id" : }
{ "create": { "_index": "gb", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-15", "name" : "Mary Jones", "tweet" : "However did I manage before Elasticsearch?", "user_id" : }
{ "create": { "_index": "us", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-16", "name" : "John Smith", "tweet" : "The Elasticsearch API is really easy to use", "user_id" : }
{ "create": { "_index": "gb", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-17", "name" : "Mary Jones", "tweet" : "The Query DSL is really powerful and flexible", "user_id" : }
{ "create": { "_index": "us", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-18", "name" : "John Smith", "user_id" : }
{ "create": { "_index": "gb", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-19", "name" : "Mary Jones", "tweet" : "Geo-location aggregations are really cool", "user_id" : }
{ "create": { "_index": "us", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-20", "name" : "John Smith", "tweet" : "Elasticsearch surely is one of the hottest new NoSQL products", "user_id" : }
{ "create": { "_index": "gb", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-21", "name" : "Mary Jones", "tweet" : "Elasticsearch is built for the cloud, easy to scale", "user_id" : }
{ "create": { "_index": "us", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-22", "name" : "John Smith", "tweet" : "Elasticsearch and I have left the honeymoon stage, and I still love her.", "user_id" : }
{ "create": { "_index": "gb", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-23", "name" : "Mary Jones", "tweet" : "So yes, I am an Elasticsearch fanboy", "user_id" : }
{ "create": { "_index": "us", "_type": "tweet", "_id": "" }}
{ "date" : "2014-09-24", "name" : "John Smith", "tweet" : "How many more cheesy tweets do I have to write?", "user_id" : }

ElasticSearch测试数据的更多相关文章

  1. Elasticsearch.Net使用(一)【入门篇】

    http://blog.csdn.net/wulex/article/details/52138564 加数据 //在调用下面的index方法的时候,如果没有指定使用哪个index,ElasticSe ...

  2. Elasticsearch第五篇:PlainElastic.Net 操作 Elasticsearch

    再次强调,我安装的Elasticsearch 版本是 7.8.0 ,C# 操作 Elasticsearch 的驱动有 NEST.Elasticsearch.net .PlainElastic.Net ...

  3. php提供一维数组模糊查询

    2019年9月30日14:36:15 提供一维数组模糊查询,只支持utf-8 内部处理是Unicode 编码特殊编码格式的可能会出错 if (!function_exists('arrayFuzzyQ ...

  4. 如何保存JMeter的性能测试数据到ElasticSearch上,并且使用Kibana进行可视化分析(1)

    前言 Jmeter是一款性能测试,压力测试的开源工具,被大量的测试人员拿来测试产品的性能,负载等等. Jmeter除了强大的预置的各种插件,各种可视化图表工具以外,也有些固有的缺陷,例如: 我们往往只 ...

  5. ElasticSearch第四步-查询详解

    ElasticSearch系列学习 ElasticSearch第一步-环境配置 ElasticSearch第二步-CRUD之Sense ElasticSearch第三步-中文分词 ElasticSea ...

  6. Elasticsearch 教程--搜索

    搜索 – 基本工具 到目前为止,我们已经学习了Elasticsearch的分布式NOSQL文档存储,我们可以直接把JSON文档扔到Elasticsearch中,然后直接通过ID来进行调取.但是Elas ...

  7. ElasticSearch大数据分布式弹性搜索引擎使用

    阅读目录: 背景 安装 查找.下载rpm包 .执行rpm包安装 配置elasticsearch专属账户和组 设置elasticsearch文件所有者 切换到elasticsearch专属账户测试能否成 ...

  8. elasticsearch之python备份

    一:elasticsearch原理 Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎.无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进.性能最好的.功 ...

  9. 为Elasticsearch添加中文分词,对比分词器效果

    http://keenwon.com/1404.html Elasticsearch中,内置了很多分词器(analyzers),例如standard (标准分词器).english(英文分词)和chi ...

随机推荐

  1. 湘潭邀请赛 2018 E From Tree to Graph

    题意: 给出一棵树以及m,a,b,x0,y0.之后加m条边{(x1,LCA(x1,y1)),(x2,LCA(x2,y2))...(xm,LCA(xm,ym))}.定义z = f(0)^f(1)^... ...

  2. [blockchain-035]eos的部署安装智能合约

    0.参考资料 https://github.com/EOSIO/eos/wiki 1. eos的github地址 https://github.com/EOSIO/eos 2.下载eos源码 git ...

  3. POJ 2406 Power Strings 暴力

    emmmm 显然的是a串长度是s串长度的因数 我们可以暴力枚举因数然后暴力check #include<cstdio> #include<algorithm> #include ...

  4. JAVA File方法各类文件复制操作

    import java.io.*; public class AllFile { public static void main(String[] args) throws Exception {// ...

  5. sql或oracle插入数据时进行md5加密

    1.sql简单直接调用: SELECT hashbytes(') ; 2.oracle要复杂些 首写需要建函数: CREATE OR REPLACE FUNCTION MD5( passwd IN V ...

  6. 2016"百度之星" - 初赛(Astar Round2A)HDU 5695 拓扑排序+优先队列

    Gym Class Time Limit: 6000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total S ...

  7. TCP面试题之三次握手过程

    TCP简介: 1.面向连接的.可靠的.基于字节流的传输层的通信协议: 2.将应用层的数据流分割成报文段并发送给目标节点的TCP层: 3.数据包都有序号,对方收到则发送ACK确认,未收到则重传: 4.使 ...

  8. git项目初始化的问题汇总

    转:https://blog.csdn.net/Free_Wind22/article/details/81628721 1.在Git官网上点击New repository新建项目: 2.在本地新建一 ...

  9. Lesson10 Fianl and fellings

    1)Revision History Date Issue Description Author 8/May/2015 1.0 Finish the WPF of our small game,sol ...

  10. Broadcom GNSS xxx Geolocaltion Sensor与Windows导航程序的兼容性(转)

    Broadcom是Windows 8(3G)平板普遍采用的一款GPS传感器, 其windows驱动程序可以提供GNSS接口.GNSS接口提供的数据,说实话确实比普通手机的数据好.在开机.室外.无AGP ...