class IReBlogEsServiceImpl implements IReBlogEsService {

    @Override
    public Page<ReBlog> query(String condition, PageDTO pageDTO) {
        SearchQuery searchQuery = new NativeSearchQueryBuilder()
                .withQuery(QueryBuilders.multiMatchQuery(condition, "title", "author", "contentMarkdown", "summary"))
                .withPageable(PageRequest.of(pageDTO.getPage() - 1, pageDTO.getCount()))
                .build();
        return repository.search(searchQuery);
    }

}

class IReBlogEsServiceImplTest {

    @Autowired
    private IReBlogEsService service;

    @Test
    void query() {

        Page<ReBlog> query = service.query("git", new PageDTO(1, 10));
        query.forEach(System.out::println);
    }

}