ICE 내부 특정 NodeType에 대한 쿼리를 실행하기 위한 API 유형으로, 다음과 같은 추가적인 항목을 정의한다.
...
Expand | ||||
---|---|---|---|---|
| ||||
{{protocol}}://{{hostname}}:{{port}}/svc/snack/list?_siteId=bestshop&id=104&name=오레오 cacheKey api::snack>list?&id.matchingShould=104&name.matchingShould=오레오
|
Expand | ||||
---|---|---|---|---|
| ||||
{{protocol}}://{{hostname}}:{{port}}/svc/snack/list?_siteId=bestshop&id=104&name=오레오{{protocol}}://{{hostname}}:{{port}}/svc/snack/list?_siteId=bestshop&id=105&name=오레오 cacheKey api::snack>list?&name.matchingShould=오레오
|
...
커스텀 처리가 필요한 경우 해당 서비스 정의를 해야한다.
아래는 상품 통합 검색 API에 customFilter를 추가하는 사례이다.
Class 추가
implements QueryFilter
하는 class 를 하나 생성한다.
@Component 어노테이션 추가
@Component("productSearchFilter")
custom 질의 작성
createQuery안에 Lucene에서 제공하는 쿼리로 직접 질의를 작성할 수 있다.
...
Sample
Code Block | ||
---|---|---|
| ||
{ "typeId": "api", "category": "product", "apiId": "readsearch", "apiName": "상품Product Search 조회List", "apiType": "service", "method": "GET", "parameters": [ { "parameter": "productIdcategoryId", "name": "상품ID카테고리아이디", "valueType": "STRING", "required": true false } ]}, "statistic": true, "aggregation": false,{ "root": { "configIdparameter": "rootsearchValue", "tidname": "siteProduct검색어", "typevalueType": "querySTRING", "resultTyperequired": "OBJECT", false } "cacheable": false ], "cacheTimestatistic": 1true, "allowParamsaggregation": false, "orderNoroot": 1,{ "customResponseconfigId": "productReadResponseroot", "querytid": [ { "siteProduct", "methodtype": "matchingquery", "fieldallowParams": "id"false, "valueorderNo": "{{:productId}}" 1, "cacheable": }true, { "cacheTime": 60, "methodcustomResponse": "matchingproductListResponse", "fieldcustomFilter": "approvalStatusproductSearchFilter", "valuequery": "approval" [ }, { { "method": "matching", "field": "saleStatussite", "value": "selling"{{:_siteId}}" }, { "method": "matching", "field": "exposureapprovalStatus", "value": "trueapproval" }, { "method": "matching", "field": "deletedsaleStatus", "value": "falseselling" }, { "method": "matching", "field": "siteexposure", "value": "{{:_siteId}}"true" }, { ], "responsemethod": ["matching", {"field": "deleted", "field": "id","value": "false" }, { "method": "sorting", "value": "{{:sorting}},id desc" }, { "method": "page", "value": "{{:page}}" }, { "typemethod": "fieldpageSize", "value": "{{:pageSize}}" }, { "fieldmethod": "namematching", "typefield": "fieldsiteCategories", "value": "" }, { {{:categoryId}}" "field": "siteProductSaleInfo", } "type": "field", ], "valueresponse": ""[ }, { { "field": "optionTypeid", "type": "field", "value": "baseProduct.productOptionInfo.optionType" }, { "field": "productOptionCodesname", "type": "field", "value": "baseProduct.productOptionInfo.productOptionCodes"" }, { "field": "productOptionssiteCategories", "type": "field", "value": "baseProduct.productOptionInfo.productOptions" }, { "field": "productDetailsiteProductSaleInfo", "type": "field", "value": "baseProduct.productDetail" }, { "field": "images", "type": "field", "value": "baseProduct.images" }, { "field": "videoscreated", "type": "field", "value": "baseProduct.videoscreated" } ] } } |