diff --git a/README.cn.md b/README.cn.md index c8937af..04d9795 100644 --- a/README.cn.md +++ b/README.cn.md @@ -95,16 +95,30 @@ public class ApplicationRunnerTest implements ApplicationRunner { public void run(ApplicationArguments args) throws Exception { List vector = Lists.newArrayList(0.1f,0.2f,0.3f); + //查询 MilvusResp> query = mapper.searchWrapper() .eq(Face::getPersonId, 1l) .vector(vector) .limit(100l) .query(); + MilvusResp> query2 = mapper.getById(1l); + + //删除 MilvusResp remove= mapper.deleteWrapper() .eq(Face::getPersonId, 1l) .id(111) .remove(); + MilvusResp remove2 = mapper.removeById(1l); + + //更新 + Face face=new Face(); + face.setFaceVector(vector); + MilvusResp update = mapper.updateWrapper() + .eq(Face::getPersonId, 1l) + .update(face); + face.setPersonId(1l); + MilvusResp update2 = mapper.updateById(face); } } ``` diff --git a/README.md b/README.md index bd7a8d8..98c04f7 100644 --- a/README.md +++ b/README.md @@ -95,16 +95,30 @@ public class ApplicationRunnerTest implements ApplicationRunner { public void run(ApplicationArguments args) throws Exception { List vector = Lists.newArrayList(0.1f,0.2f,0.3f); + //查询 MilvusResp> query = mapper.searchWrapper() .eq(Face::getPersonId, 1l) .vector(vector) .limit(100l) .query(); + MilvusResp> query2 = mapper.getById(1l); + + //删除 MilvusResp remove= mapper.deleteWrapper() .eq(Face::getPersonId, 1l) .id(111) .remove(); + MilvusResp remove2 = mapper.removeById(1l); + + //更新 + Face face=new Face(); + face.setFaceVector(vector); + MilvusResp update = mapper.updateWrapper() + .eq(Face::getPersonId, 1l) + .update(face); + face.setPersonId(1l); + MilvusResp update2 = mapper.updateById(face); } }