X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Felk%2Fclient%2FPolicyElasticSearchController.java;h=77e45e30df3ddcaa14ae7be39e15c783aab0a483;hb=1a32a85b3307b11fba07bc6f2ac3fe6d2c0028d0;hp=78da2a5724cd667a924df67fdc6b843049875cf4;hpb=85e767c65b23a1fef35e5a0199a57bf755070815;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java index 78da2a572..77e45e30d 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java @@ -231,7 +231,7 @@ public class PolicyElasticSearchController{ if(searchData.getPolicyType() != null && "closedLoop".equals(searchData.getPolicyType())){ searchKeyValue.put("jsonBodyData", "*" +entry[1] +"*"); }else{ - searchKeyValue.put(entry[0], entry[1]); + searchText = entry[1]; } } } @@ -265,13 +265,13 @@ public class PolicyElasticSearchController{ searchKeyValue.put("jsonBodyData."+d2Service+"", "true"); } if(searchData.getVnfType() != null){ - searchKeyValue.put("jsonBodyData", "*" +searchData.getVnfType() +"*"); + searchKeyValue.put("jsonBodyData", "*"+searchData.getVnfType()+"*"); } if(searchData.getPolicyStatus() != null){ - searchKeyValue.put("jsonBodyData", "*" +searchData.getPolicyStatus()+"*"); + searchKeyValue.put("jsonBodyData", "*"+searchData.getPolicyStatus()+"*"); } if(searchData.getVproAction() != null){ - searchKeyValue.put("jsonBodyData", "*" +searchData.getVproAction()+"*"); + searchKeyValue.put("jsonBodyData", "*"+searchData.getVproAction()+"*"); } if(searchData.getServiceType() != null){ searchKeyValue.put("serviceType", searchData.getServiceType()); @@ -288,8 +288,10 @@ public class PolicyElasticSearchController{ type = ElkConnector.PolicyIndexType.decision; }else if(policyType.equalsIgnoreCase("config")){ type = ElkConnector.PolicyIndexType.config; - }else { + }else if(policyType.equalsIgnoreCase("closedloop")){ type = ElkConnector.PolicyIndexType.closedloop; + }else{ + type = ElkConnector.PolicyIndexType.all; } }else{ type = ElkConnector.PolicyIndexType.all;