| | |
| | | return false; |
| | | } |
| | | if(statusR.getStatus().intValue() == R.Status.Success.getCode()){ |
| | | logger.error("insert 返回值:" + statusR.getStatus().intValue()); |
| | | logger.debug("insert 返回值:" + statusR.getStatus().intValue()); |
| | | return true; |
| | | } |
| | | return false; |
| | |
| | | MetricType metricType = null; |
| | | if(query.getMetricType() == null || query.getMetricType().equals("")){ |
| | | metricType = MetricType.L2; |
| | | } else if(query.getMetricType().equals(com.walker.support.milvus.MetricType.INDEX_IMAGE)){ |
| | | metricType = MetricType.L2; |
| | | } else if(query.getMetricType().equals(com.walker.support.milvus.MetricType.INDEX_NLP)){ |
| | | metricType = MetricType.IP; |
| | | } else { |
| | | throw new UnsupportedOperationException("暂未支持的距离类型:" + query.getMetricType()); |
| | | } |
| | | |
| | | SearchParam searchParam = SearchParam.newBuilder() |
| | |
| | | if(outField.equals("id")){ |
| | | outData.setKeyList((List<Long>)wrapperSearch.getFieldData("id", 0)); |
| | | } else { |
| | | outData.setBusinessIdList((List<Long>)wrapperSearch.getFieldData(outField, 0)); |
| | | outData.setBusinessIdList((List<String>)wrapperSearch.getFieldData(outField, 0)); |
| | | } |
| | | } |
| | | // System.out.println(wrapperSearch.getFieldData("book_id", 0)); |