我将SpringBoot连接到在docker下运行的 flex 搜索。
在ElasticsearchRepository中
findAllById(Iterable<BigInteger> ids)
运行正常findBySicCode(String sicCode)
和findAllBySicCode(string sicCode)
运行正常但是当我尝试
findAllBySicCode(List<String> sicCodes)
给我QueryShardException [无法解析查询] parse_exception:无法解析'[13201]':在第1行第6列遇到“”]“”]“”我在这里传递了13201。
无法理解ES索引或我的代码有问题
最佳答案
试试findAllBySicCodeIn(List<String> sicCodes)
这是有关https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.query-creation的不错的文档
关于java - ElasticsearchRepository中的FindAllByColumn(List <String> columnValues)无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61725350/