zoukankan      html  css  js  c++  java
  • ElasticSearch测试数据

    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": "1" }}
    { "email" : "john@smith.com", "name" : "John Smith", "username" : "@john" }
    { "create": { "_index": "gb", "_type": "user", "_id": "2" }}
    { "email" : "mary@jones.com", "name" : "Mary Jones", "username" : "@mary" }
    { "create": { "_index": "gb", "_type": "tweet", "_id": "3" }}
    { "date" : "2014-09-13", "name" : "Mary Jones", "tweet" : "Elasticsearch means full text search has never been so easy", "user_id" : 2 }
    { "create": { "_index": "us", "_type": "tweet", "_id": "4" }}
    { "date" : "2014-09-14", "name" : "John Smith", "tweet" : "@mary it is not just text, it does everything", "user_id" : 1 }
    { "create": { "_index": "gb", "_type": "tweet", "_id": "5" }}
    { "date" : "2014-09-15", "name" : "Mary Jones", "tweet" : "However did I manage before Elasticsearch?", "user_id" : 2 }
    { "create": { "_index": "us", "_type": "tweet", "_id": "6" }}
    { "date" : "2014-09-16", "name" : "John Smith",  "tweet" : "The Elasticsearch API is really easy to use", "user_id" : 1 }
    { "create": { "_index": "gb", "_type": "tweet", "_id": "7" }}
    { "date" : "2014-09-17", "name" : "Mary Jones", "tweet" : "The Query DSL is really powerful and flexible", "user_id" : 2 }
    { "create": { "_index": "us", "_type": "tweet", "_id": "8" }}
    { "date" : "2014-09-18", "name" : "John Smith", "user_id" : 1 }
    { "create": { "_index": "gb", "_type": "tweet", "_id": "9" }}
    { "date" : "2014-09-19", "name" : "Mary Jones", "tweet" : "Geo-location aggregations are really cool", "user_id" : 2 }
    { "create": { "_index": "us", "_type": "tweet", "_id": "10" }}
    { "date" : "2014-09-20", "name" : "John Smith", "tweet" : "Elasticsearch surely is one of the hottest new NoSQL products", "user_id" : 1 }
    { "create": { "_index": "gb", "_type": "tweet", "_id": "11" }}
    { "date" : "2014-09-21", "name" : "Mary Jones", "tweet" : "Elasticsearch is built for the cloud, easy to scale", "user_id" : 2 }
    { "create": { "_index": "us", "_type": "tweet", "_id": "12" }}
    { "date" : "2014-09-22", "name" : "John Smith", "tweet" : "Elasticsearch and I have left the honeymoon stage, and I still love her.", "user_id" : 1 }
    { "create": { "_index": "gb", "_type": "tweet", "_id": "13" }}
    { "date" : "2014-09-23", "name" : "Mary Jones", "tweet" : "So yes, I am an Elasticsearch fanboy", "user_id" : 2 }
    { "create": { "_index": "us", "_type": "tweet", "_id": "14" }}
    { "date" : "2014-09-24", "name" : "John Smith", "tweet" : "How many more cheesy tweets do I have to write?", "user_id" : 1 }
  • 相关阅读:
    微信小程序通过getPhoneNumber后台PHP解密获取用户手机号码
    设置API:wx.openSetting,wx.getSetting使用说明(示例:地图授权与取消授权后的重新授权)
    微信小程序之上传图片和图片预览
    微信小程序上传图片(前端+PHP后端)
    微信小程序拒绝授权后重新拉起授权窗口
    微信小程序如何使用 Git 实现版本管理和协作开发
    配置同时使用 Gitlab、Github、Gitee(码云) 共存的开发环境
    linux 系统下Anaconda的安装【安装python3.6环境首选】
    利用phpqrcode二维码生成类库合成带logo的二维码并且用合成的二维码生成海报(二)
    利用phpqrcode二维码生成类库和imagecopymerge函数制拼接图片的经验(一)
  • 原文地址:https://www.cnblogs.com/shaosks/p/7515184.html
Copyright © 2011-2022 走看看