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. [Codeforces Round #516 (Div. 2, by Moscow Team Olympiad) ](A~E)

    A: 题目大意:给你$a,b,c$三条边,可以给任意的边加任意的长度,求最少共加多少长度使得可以构成三角形 题解:排个序,若可以组成,输出$0$,否则输出$c-a-b+1(设a\leqslant b\ ...

  2. [poj] 3347 Kadj Square || 计算几何的“线段覆盖”

    原题 多组数据,给出n个正方形的边长,使他们以45度角倾斜的情况下最靠左(在第一象限内),如图.求从上看能看到哪几个完整的正方形. 借鉴于https://www.cnblogs.com/Ritchie ...

  3. java中TCP总结

    先看一张图,画的很挫,将就看. TCP 客户端与服务端通信时,是服务端会拿到客户端的socket进行通信. TCP就相当于以前的座机,有一个听筒和一个话筒,A用话筒说话,B用听筒听. 下面讲讲java ...

  4. 双系统Ubuntu 无 启用wifi选项

    安装好双系统进入ubuntu(14.04)后发现只能用有线连接,不能用wifi.网络连接里无启用wifi选项. 1.查询网卡型号,发现是BCM43132 命令:   lspci | grep -i n ...

  5. ubuntu上安装ffmpeg

      安装包和主要步骤: 1. 首先安装系统基础环境 RHEL & CentOS 系列:yum install -y automake autoconf libtool gcc gcc-c++ ...

  6. 快速了解Android重要机制

    转自 http://www.jianshu.com/p/5f6d79323923 一.Android系统底层研究 关于底层的知识点不是在一篇文章中能讲解清楚,参见本人的Android底层研究系列,不断 ...

  7. Log4Net日志分类和自动维护

    背景 在程序中,我们调试运行时信息,Log4Net是一个不错的解决方案.不知道是我用的不好,用到最后反而都不想看日志了.原因是因为我n个功能使用的默认的Logger来记录日志,这样以来,所有功能记录的 ...

  8. Linux下的GitHub安装与简单配置教程 ~ 转载

    Linux下的GitHub安装与简单配置教程   1.GitHub简介 Git是一个分布式版本控制系统,与其相对的是CVS.SVN等集中式的版本控制系统. 2.Git的安装 1)安装Git a.查看与 ...

  9. 详解利用ShoeBox制作位图字体

    http://childhood.logdown.com/posts/190580/-details-using-shoebox-produce-bitmap-fonts?utm_source=tui ...

  10. OS X升级到10.10之后使用pod出现问题的解决方法

     http://blog.csdn.net/dqjyong/article/details/37958067 OS X升级到10.10之后使用pod出现问题的解决方法 分类: IOS2014-07-1 ...