elasticsearch curl命令集合

curl -XPUT http://127.0.0.1:9200/qywx

curl -XPOST http://127.0.0.1:9200/qywx/resource/_mapping -d'
{
        "properties": {
            "content": {
                "type": "text",
                "analyzer": "ik_max_word",
                "search_analyzer": "ik_max_word"
            }
        }
    
}'

curl -XPOST http://127.0.0.1:9200/qywx/resource/5 -d'
{
                "solutionId": 105,
                "solutionMsg": null,
                "solutionTitle": "覈保",
                "solutionRanking": null,
                "solutionOperator": null,
                "makedate": null,
                "modifydate": 1587025053288,
                "solutionTime": null,
                "solutionClassify": null,
                "solutionKeyword": null,
                "solutionText": null
            }
'
curl -XPOST http://127.0.0.1:9200/qywx/resource/4 -d'
{
                "solutionId": 100,
                "solutionMsg": "",
                "solutionTitle": "投保單號已使用",
                "solutionRanking": "1",
                "solutionOperator": "按時",
                "makedate": 1584689254955,
                "modifydate": 1584687950500,
                "solutionTime": 0,
                "solutionClassify": "失敗",
                "solutionKeyword": "失敗",
                "solutionText": "投保單號已使用"
            }
'
curl -XPOST http://127.0.0.1:9200/qywx/resource/3 -d'
{
                "solutionId": 101,
                "solutionMsg": "",
                "solutionTitle": "Failed",
                "solutionRanking": "1",
                "solutionOperator": "按時",
                "makedate": 1584689402804,
                "modifydate": 1584687950500,
                "solutionTime": 0,
                "solutionClassify": "失敗",
                "solutionKeyword": "失敗",
                "solutionText": "Failed"
            }
'
curl -XPOST http://127.0.0.1:9200/qywx/resource/2 -d'
{
                "solutionId": 103,
                "solutionMsg": "",
                "solutionTitle": "覈保失敗",
                "solutionRanking": "1",
                "solutionOperator": "按時",
                "makedate": 1584689555683,
                "modifydate": 1584687950500,
                "solutionTime": 0,
                "solutionClassify": "失敗",
                "solutionKeyword": "失敗",
                "solutionText": "覈保失敗"
            }
'
curl -XPOST http://127.0.0.1:9200/qywx/resource/1 -d'
{
                "solutionId": 104,
                "solutionMsg": "",
                "solutionTitle": "(error99)產品未開售",
                "solutionRanking": null,
                "solutionOperator": "001",
                "makedate": 1585098953831,
                "modifydate": null,
                "solutionTime": 0,
                "solutionClassify": "所有銀行",
                "solutionKeyword": "限額,產品,未開售",
                "solutionText": "當在銀行填寫完成投保單,覈保時報“(error99)產品未開售”,則代表該產品額度已經售罄。"
            }
'


curl -X GET "localhost:9200/qywx/solution/_search" -d'
{
    "query" : {
        "match" : {
            "solutionTitle": "產"
        }
    }
}'

curl -XDELETE 'http://localhost:9200/qywx/resource/108'

curl http://127.0.0.1:9200/_cat/indices 查詢所有索引庫
curl -XDELETE 'http://localhost:9200/ybt'     刪除索引庫

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章