저는 이미 ES 문서를 살펴보고 관련 질문을 읽었습니다. 그러나 그 중 누구도 지금까지 저에게 효과가 없었습니다. 나는 다음과 같은 본문 형식 다음이 내 지역 ES 설치에 대량 API를 사용하여 POST 요청을 시도Elastic Search에서 Json 파일 다중 값 문서를 한 번에 일괄 인덱싱하려면 어떻게해야합니까?
[ {
"account": "Sam420",
"language": null,
"watchers": 0,
"commits": 14,
"contributors": 2,
"stars": 0,
"rank": 16,
}
{
"account": "Kelly",
"language": null,
"watchers": 0,
"commits": 14,
"contributors": 2,
"stars": 0,
"rank": 16,
} ]
:이 형식의 여러 문서 작성에 기본적으로
내가 JSON 파일이
{ "index": {} }
{
"account": "Kelly",
"language": null,
"watchers": 0,
"commits": 14,
"contributors": 2,
"stars": 0,
"rank": 16,
}
{ "index": {} }
{
"account": "Kelly",
"language": null,
"watchers": 0,
"commits": 14,
"contributors": 2,
"stars": 0,
"rank": 16,
}
하지만 파서 오류가 발생합니다. 나는 Github에서의 API에서 100 개 이상의 문서 REPO 데이터를 당기는거야
{
"error": {
"root_cause": [
{
"type": "json_parse_exception",
"reason": "Unexpected character (':' (code 58)): expected a
valid value (number, String, array, object, 'true',
'false' or 'null')\n at [Source: [[email protected]; line:
1, column: 10]"
}],
"type": "json_parse_exception",
"reason": "Unexpected character (':' (code 58)): expected a
valid value (number, String, array, object 'true',
'false' or 'null')\n at [Source: [[email protected]; line:
1, column: 10]"
},
"status": 500
}
그러나 다음은
{ "index": { "_index": "folder" } }
{ "account": "Sam420", "language": null, ... }
{ "index": { "_index": "Canigan"} }
{ "account": "Kelly", "language": null, ... }
파서 오류 : 그것은이 같은 데이터 당 하나의 행으로 내가 데이터를 재 배열 할 때 작동합니까 , 각 값은 수직으로 정렬됩니다. 스크립트를 사용하여 형식을 다시 지정하지 않고도 이미 제공 한 Json 형식의 여러 문서를 대량 색인화하려면 어떻게해야합니까? 그렇지 않다면 한 번에 여러 문서를 색인화하는 데 사용할 수있는 대량 색인 이외의 다른 방법이 있습니까?
구문 분석 오류 및 쿼리를 붙여 넣을 수 있습니까? – user3775217
요청하신대로 추가되었습니다. – MLhacker