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. BZOJ 2223 [Coci 2009]PATULJCI | 主席树练习 (好像是个权限题啊)

    题目: 给个序列,问[l,r]区间内是否存在x>(r-l+1)>>1 题解: 好像大家都觉得这个题比较简单,没人写题解啊 先说BZOJ样例的格式应该是,第二个数是序列中数的范围(就是 ...

  2. 【BZOJ 5048 塌陷的牧场】

    Time Limit: 25 Sec  Memory Limit: 256 MBSubmit: 77  Solved: 34[Submit][Status][Discuss] Description ...

  3. Tomcat学习笔记(九)

    Tomcat Session管理 Catalina通过一个称为Session管理器的组件来管理建立Session对象,该组件由org.apache.catalina.Manager接口表示.Sessi ...

  4. libcurl网络连接使用tcp/ip

    CURL *curl; CURLcode res; const char *request = "GETas.xxxxE测试发送"; curl_socket_t sockfd; / ...

  5. yum 和 apt-get

    yum 和apt-get 一般来说著名的linux系统基本上分两大类: 1.RedHat系列:Redhat.Centos.Fedora等 2.Debian系列:Debian.Ubuntu等 RedHa ...

  6. 转载:C++ 多继承和虚继承的内存布局

    C++ 多继承和虚继承的内存布局[已翻译100%] 英文原文:Memory Layout for Multiple and Virtual Inheritance 标签: <无> run_ ...

  7. GHC extensions

    OverloadedStrings 这是最常见的一个扩展,很多时候都能看到   Haskell中,数字是num的多态,比如:   a :: Int a = 1   b :: Double b = 1 ...

  8. C++ MFC std::string转为 std::wstring

    std::string转为 std::wstring std::wstring UTF8_To_UTF16(const std::string& source) { unsigned long ...

  9. Linux 设备驱动--- 阻塞型字符设备驱动 --- O_NONBLOCK --- 非阻塞标志【转】

    转自:http://blog.csdn.net/yikai2009/article/details/8653697 版权声明:本文为博主原创文章,未经博主允许不得转载.   目录(?)[-] 阻塞 阻 ...

  10. UVA 10985 Rings'n'Ropes

    最短路 参考了Staingger的博客 感觉DP的状态记录还是有毛病.可以DFS寻找结果也. #include <map> #include <set> #include &l ...