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. DateBase -- Rising Temperature

    Question: Given a Weather table, write a SQL query to find all dates' Ids with higher temperature co ...

  2. BZOJ 1043 【bzoj1043】[HAOI2008]下落的圆盘 | 暴力么??

    题目: 题解: 大概是黄学长的博客 #include<cstdio> #include<algorithm> #include<cstring> #include& ...

  3. 【CF Edu 28 A. Curriculum Vitae】

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  4. Cow Navigation(USACO)

    题目大意: 给定一个N*N的矩阵,并告诉你每一个格子能否经过,要求你求出(n,1)到(1,n)的最短路径的操作数. 其中操作有2种,第一种是沿着目前的方向走一格,第二种是向左或向右转90° 由于题目设 ...

  5. 9.OpenStack安装web界面

    安装仪表板 安装仪表板组件 yum install -y openstack-dashboard httpd mod_wsgi memcached python-memcached 编辑/etc/op ...

  6. 并发策略-CAS算法

    对于并发控制而言,我们平时用的锁(synchronized,Lock)是一种悲观的策略.它总是假设每一次临界区操作会产生冲突,因此,必须对每次操作都小心翼翼.如果多个线程同时访问临界区资源,就宁可牺牲 ...

  7. centos6.6部署mysql mmm高可用架构

    一.环境简述 1.工作逻辑图 2.MySQL-MMM优缺点 优点:高可用性,扩展性好,出现故障自动切换,对于主主同步,在同一时间只提供一台数据库写操作,保证的数据的一致性. 缺点:Monitor节点是 ...

  8. poj 1329(已知三点求外接圆方程.)

    Circle Through Three Points Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3766   Acce ...

  9. 利用ItextSharp产PDF完整操作

    记得上回有写到用C#操作Excel(.net 4.0) 很多朋友说推荐用NPOI,的确,用微软自带的操作execl会有很大的问题.客户的主机不愿意安装excel, 这时我才意识到用自带组件完全是不行的 ...

  10. HDU 1394.Minimum Inversion Number-最小逆序数-完全版线段树(单点增减、区间求和)

    HDU1394.Minimum Inversion Number 这个题求最小逆序数,先建一个空的树,然后每输入一个值,就先查询一下,查询之后,更新线段树,然后遍历一遍,每次将第一个数放到最后之后,减 ...