검색 및 인덱싱 처리하기
이 문서는 검색엔진 사용법에 대해 다룹니다. 첫 번째로는 검색 데이터 추가하는 방법에 대해 설명합니다. 두 번째로는 검색 데이터 조회하는 방법에 대해 설명합니다.
검색 데이터 추가
검색 데이터는 python 기동 시 DB에 존재하는 전체 상품데이터를 인덱싱하며, 배치를 통해 변경된 상품 데이터를 업데이트합니다.
DB에 있는 데이터 외의 데이터를 추가하고 싶을 경우 아래 예제 방식으로 쿼리 요청하여 추가할 수 있습니다.
쿼리 요청 (예제)
url : http://43.200.20.154:3001/searchDataInsert
method : POST
body :
[{
"goods_no" : "10001881",
"entr_no" : "10000021111",
"goods_comp_cd" : "10",
"goods_typ_cd" : "10",
"sale_meth_cd" : "10",
"brand_no" : "100002",
"buyr_age_lmt_cd" : "15",
"disp_yn" : "Y",
"sale_stat_cd" : "10",
"goods_reg_dtm" : "2023-06-19T21:13:52.764870",
"sale_str_dtm" : "2023-06-19T00:00:00",
"sale_end_dtm" : "2999-12-31T23:59:59",
"stk_mgr_yn" : "Y",
"deli_proc_typ_cd" : "20",
"deli_goods_gb_cd" : "01",
"deli_way_cd" : "01",
"deli_dday" : 1,
"deli_polc_no" : "10000009",
"prc_hist_str_dtm" : "2023-06-19T21:13:52.798920",
"prc_hist_end_dtm" : "2999-12-31T23:59:59",
"rcnt_sale_prc" : 2000,
"sale_prc" : 1110,
"aply_prc" : 1070,
"dc_rate" : 46,
"disp_ctg_no" : "212",
"dlex_typ_cd" : "30",
"goods_immed_dc_cpn_no" : "10001881",
"goods_immed_dc_aply_str_dtm" : "2023-06-24T10:12:00",
"goods_immed_dc_aply_end_dtm" : "2023-07-23T23:59:59",
"goods_rep_img_cont_sn" : "",
"rserv_sale_yn" : "N",
"rserv_str_dtm" : null,
"rserv_end_dtm" : null,
"goods_rev_cnt" : 65,
"goods_rev_hlpful_cnt" : 949,
"goods_rev_starscr_avg_val" : 1.49,
"wish_list_cnt" : 23,
"lang_cd" : "ko",
"goods_nm" : "단일상품6",
"adve_wrd" : null,
"prest_nm" : null,
"brand_nm" : "멀버리",
"sch_kwd_nm" : "123,3445",
"brand_img_path_nm" : "https://img-stg.x2bee.com/attachment/goods/2023/06/24/513c45e1-1de5-492e-85cb-a62766fae2dc_10.png",
"brand_img_file_nm" : "2023-06-24 19 46 37.png",
"goods_rep_img_path_nm" : "https://img-stg.x2bee.com/attachment/goods/2023/06/20/905d6c1b-4a63-409d-8009-81df104dd1d3_10.jpg",
"goods_dtl_desc" : "<p>l;'l;'l'kl;'kl;</p>"
}]
요청 예시 URL 및 메서드
URL: http://43.200.20.154:3001/searchDataInsert
method: POST
검색 데이터 조회
상품 데이터는 아래 엔드포인트에
searchWords값을 보내 조회할 수 있습니다. URL: http://43.200.20.154:3001/esTypeX2beeSearch현재 검색어로 매칭되는 필드:
goods_nm
adve_wrd
prest_nm
brand_nm
sch_kwd_nm
goods_dtl_desc
데이터 조회 (예제)
응답 예제 (JSON)
마지막 업데이트