2018/10
-
jqeury로 json 정렬하기프로그래밍/Etc 2018. 10. 31. 17:24
참고: https://stackoverflow.com/questions/881510/sorting-json-by-values jquery로 json 파일 정렬하는 법 prop 은 정렬하고 싶은 json 파일의 필드 이름이고 asc는 순차 정렬 여부를 의미함. function sortResults(result, prop, asc) { SortedResult = result.sort(function(a, b) { if (asc) { return (a[prop] > b[prop]) ? 1 : ((a[prop] a[prop]) ? 1 : ((b[prop] < a[prop]) ? -1 : 0); } }); return Sort..
-
elasticsearch 6.3.2 bulk 색인하기 - 색인에러 : Rejecting mapping update to [index name ] as the final mapping would have more than 1 type프로그래밍/검색 2018. 10. 3. 18:54
elasticsearch 6.3.2 bulk 색인하기 색인에러 : Rejecting mapping update to [index name ] as the final mapping would have more than 1 type 이전 포스팅에 이어서 elasticsearch 6 버전을 설치하고 bulk 색인을 계속 하고 있는데 처음보는 에러가 나왔다. # curl -H "Content-Type: application/json" -XPOST "localhost:9200/bank/_doc/_bulk?pretty&refresh" --data-binary "@newdata.json"{ "took" : 458, "errors" : true, "items" : [ { "index" : { "_index" : "인덱..
-
elastic search 6.3.2 bulk 색인하기 - 에러 메세지 없이 종료되는 이슈프로그래밍/검색 2018. 10. 3. 18:27
elasticsearch 6.3 버전을 새로 받아 설치 완료하고 bulk index 준비를 하였다. 기존 버전과 좀 차이가 있는 것 같아 아래 문서를 참고로 하였다. https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html -H 로 content type을 명시해주는 것이 예전 bulk 색인과 차이점이 있는 것 같았다. curl -H "Content-Type: application/json" -XPOST "localhost:9200/bank/_doc/_bulk?pretty&refresh" --data-binary "@check" 터미널에 실행을 했는데 아무 메세지가 나오지 않고 그대로 종료된다. ??? 색인이 되고 있는지..