第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

未指定hibernate.search.lucene_version:

未指定hibernate.search.lucene_version:

藍(lán)山帝景 2021-05-03 16:17:21
我在Spring Boot中使用Hibernate Search。我沒有對(duì)Hibernate Search進(jìn)行任何特殊配置。它僅顯示應(yīng)用程序啟動(dòng)時(shí)的警告。如何指定hibernate.search.lucene_version?我的SearchService類(使用Hibernate Search的唯一位置):@Servicepublic class SearchService {    private FullTextEntityManager fullTextEntityManager;    private QueryBuilder queryBuilder;    @Autowired    public SearchService(EntityManager entityManager) {        entityManager = entityManager.getEntityManagerFactory().createEntityManager();        fullTextEntityManager = Search.getFullTextEntityManager(entityManager);    }    @PostConstruct    public void initialize() throws InterruptedException {        fullTextEntityManager.createIndexer().startAndWait();        queryBuilder = fullTextEntityManager.getSearchFactory()                .buildQueryBuilder().forEntity(Post.class).get();    }    public List<Post> searchByQuery(String query) {        org.apache.lucene.search.Query luceneQuery = queryBuilder.phrase()                .withSlop(5)                .onField("title")                .sentence(query)                .createQuery();        Query jpaQuery = fullTextEntityManager.createFullTextQuery(luceneQuery, Post.class);        return (List<Post>) jpaQuery.setMaxResults(20).getResultList();    }}
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 197 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)