본문 바로가기

전체 글

(159)
logstash nested value to root value require 'json' begin jsonn_json = JSON.parse(event.get('jsonn').to_s || '{}') jsonn_json.each {|k,v| event.set(k, v) } event.remove('jsonn') rescue Exception => e event.tag('something happens in jsonn') end : discuss.elastic.co/t/how-to-dynamically-move-nested-key-value-to-root-level/180006/2?u=ohoroyoi
ruby text to json location = {lat: event.get('center_latitude').to_f, lon: event.get('center_longitude').to_f} event.set('location', JSON(location.to_json)) logstash ruby filter
create index with mapping text, keyword 는 따로 선 매핑 필요없으나, geo_shape, geo_point같은 경우 필요 { "mappings": { "doc": { "properties": { "city_ancestors":{ "type":"nested", "properties":{ "code":{ "type":"text", "fields":{ "keyword":{ "type":"keyword", "ignore_above":256 } } }, "id":{ "type":"text", "fields":{ "keyword":{ "type":"keyword", "ignore_above":256 } } }, "name":{ "type":"text", "fields":{ "keyword":{ "type":"keyword", "..
create geo_shape using latitude and longitude select st_makepoint(-46.635345, -23.61674)::json;
create index with mapping PUT 호스트명/인덱스명 { "mappings": { "_doc": { "properties": { "boundaries": { "type": "geo_shape", "ignore_malformed": true, "precision": "1.0m", "strategy": "recursive", "distance_error_pct": 0.009 }, "boundaries_nearby": { "type": "geo_shape", "ignore_malformed": true, "precision": "1.0m", "strategy": "recursive", "distance_error_pct": 0.009 }, "boundaries_nearby_auto": { "type": "geo_shape", "ignor..
elasticsearch index create할때 mapping 하기 https://atlas-search.ㅇㅇ.com/expedia_region_union_backup_015 { "mappings": { "doc": { "properties": { "center_geo_point": { "type": "geo_shape" }, "boundaries": { "type": "geo_shape" }, "boundaries_nearby": { "type": "geo_shape" }, "boundaries_nearby_auto": { "type": "geo_shape" } } } } }
postgresql trigger retrieve 이미 만들어진 postgresql event trigger 확인 \dS 트리거 조회 select pg_get_functiondef('functionname'::regproc); 이벤트시에 트리거로 실행되는 함수 상세 조회 참고 https://serverfault.com/questions/331024/how-can-i-show-the-content-of-a-trigger-with-psql
postgres 오류: "테이블_id컬럼_seq" 이름의 릴레이션(relation)이 없습니다 상황 - 오류: "expedia_region_union_region_id_seq" 이름의 릴레이션(relation)이 없습니다 Hibernate: select currval('expedia_region_union_region_id_seq') SQL Error: 0, SQLState: 42P01 오류: "expedia_region_union_region_id_seq" 이름의 릴레이션(relation)이 없습니다 난 프레임워크에 맡기는게 아니라 직접 id. 룰을 만들어서 객체 생성을 하려고 했음. 왜냐면 지금 이 테이블의 row는 하나하나가 OpenStreetMap 기준으로 만든 id 였기 때문. 그런데 jpa strategy를 GenerationType.IDENTITY로 설정해놔서 문제가 생긴 것 같음. ..