首页 > 解决方案 > spring boot 的弹性搜索查询

问题描述

我想将此查询放入 Spring Boot 存储库:

{
    "query": {
        "match_all": {}
    },
    "_source": 
        "data.results.id"
}

但我不知道怎么做。

@Repository

public interface HeroRepository extends ElasticsearchRepository<ES, String>{
    @Query(????????????????????????????)
    Iterable<ES> findAllId();
}

感谢您的帮助

标签: javaspring-bootelasticsearch

解决方案


推荐阅读