2017-05-15 7 views
0

메신저에서 elasticsearch에 대한 데모 데이터를로드 할 수 없습니다. Elasticsearch와 Kibana가 Sierra의 Mac에 설치되었습니다 (오류없이). 지금은이 튜토리얼 ES를 탐험하기 위해 데모 데이터로 시작하려고 : https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html 모든 잘 작동하지만 난 두 가지 문제가있어 : 나는 PUT /logstash-2015.05.20 {...}은 elasticsearch로 시작하는

ERRORMESSAGE에 오류가있어

1) :

{ 
    "error": { 
    "root_cause": [ 
     { 
     "type": "index_already_exists_exception", 

    "reason": "index [logstash-2015.05.20/1i-pAxzaTpWscYud0Ufczg] already exists", 
    "index_uuid": "1i-pAxzaTpWscYud0Ufczg", 
    "index": "logstash-2015.05.20" 
    } 
], 
"type": "index_already_exists_exception", 
"reason": "index [logstash-2015.05.20/1i-pAxzaTpWscYud0Ufczg] already exists", 
"index_uuid": "1i-pAxzaTpWscYud0Ufczg", 
"index": "logstash-2015.05.20" 
    }, 
    "status": 400 
}` 

색인이 이미 존재하는 경우이 메시지를 무시해도됩니까? 그래서 모두 괜찮을거야?

curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json` 

ERRORMESSAGE : 어떤 도움이나 힌트를

{ 
    "statusCode": 400, 
    "error": "Bad Request", 
    "message": "child \"method\" fails because [\"method\" must be one of [HEAD, GET, POST, PUT, DELETE]]", 
    "validation": { 
    "source": "query", 
    "keys": [ 
     "method" 
    ] 
    } 
} 

덕분에 내가 오류를 얻었다하더라도 다음 단계에서

2).

+0

logstash를 실행하기 전에 logstash가 색인을 생성하려고하므로 삭제해야합니다. 두 번째 오류에 대해 ** account.json ** 파일이 있습니까? 한 문서를 복사하여 탄성 모드에 추가하십시오 (벌크 모드가 아님) –

+0

logstash를 설치하지 않았습니다. 이것은 자습서의 일부가 아니므로 설치하지 마십시오. 첫 번째 버그는 내 실수 인 것 같습니다. 나는 두 번째 색인을 만들기 시작합니다. 두 번째 오류에 관해서 : 예,이 파일은 지역에 있습니다. 하지만 네가해야 할 일이 뭔지 전혀 모르겠다. 죄송합니다. ES 초보자입니다. – Enrico

답변

0

파일을보십시오. 이 두 라인은 각 문서에 대해 반복되는

{"account_number":1,"balance":39225,"firstname":"Amber","lastname":"Duke","age":32,"gender":"M","address":"880 Holmes Lane","employer":"Pyrami","email":"[email protected]","city":"Brogan","state":"IL"} 

_bulk API를 사용하여 색인 할 : 그것은 인덱스/매핑 및 기타 설정

{"index":{"_id":"1"}} 

다른 라인 한 줄 문서 자체가 포함되어 있습니다. 단지

PUT localhost:9200/bank/account/1 
{"account_number":1,"balance":39225,"firstname":"Amber","lastname":"Duke","age":32,"gender":"M","address":"880 Holmes Lane","employer":"Pyrami","email":"[email protected]","city":"Brogan","state":"IL"} 

당신이 크롬에 대한 sense 플러그인을 잘 알고 있습니까 '색인에서'문서 중 하나를 넣어하려고? elasticsearch 개발에 매우 ​​도움이 될 수 있습니다 :-)

+0

안녕하세요, 저는 늦게 답장을해서 유감입니다. uri [/ localhost : 9200/bank/account/1]의 처리기를 찾지 못했고 [PUT] 메서드가 – Enrico

+0

인데 브라우저 http : // {{ "type": "index_not_found_exception", "reason": "그런 색인이 없습니다", "resource.type": "index_or_alias", " "type": "index_not_found_exception", "reason": "해당 색인이 없습니다.", "resource.type": "resource.id": "bank", "index_uuid": "_ na _", "index" : "index_or_alias", "resource.id": "bank", "index_uuid": "_ na _", "index": "bank"}, "status": 404}' – Enrico

+0

따라서 인덱스가 존재하지 않습니다! 'http : // localhost : 9200/_cat/indices? v'에 대한 출력을 제공하십시오. –

관련 문제