0
최대 절전 모드 문서에서 매우 기본적인 최대 절전 모드 검색을 만들었습니다. 결과를 제한하는 데 어려움을 겪고 있으며 내가 잘못하고있는 것에 관한 조언을 원합니다.최대 절전 모드 검색 결과 제한
시나리오
내가
이1. Dell Laptop
2. Dell Desktop
3. HP Desktop
내 검색과 같이 보이는 인덱스에 추가 한 다음 데이터 너무
@Field(index=Index.YES, analyze=Analyze.YES, store=Store.NO)
private String name;
같은 설명 제목으로 하나의 엔티티를 사용하고 말할 수 있습니다 ,
FullTextSession fullTextSession = Search.getFullTextSession(sessionManager.getSession());
QueryBuilder queryBuilder = fullTextSession.getSearchFactory().buildQueryBuilder().forEntity(Computer.class).get();
Query luceneQuery = queryBuilder.keyword().onFields("name").matching(keyword).createQuery();
org.hibernate.search.FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery(luceneQuery, Computer.class);
당신이 그렇게 같은 검색을 수행 할 때 다음을 사용하여 키워드 검색, 그러나
Dell returns Dell Laptop, Dell Desktop
Desktop returns Dell, HP
을 수행 할 때3210
이제 모든 기능이 잘, 제대로
Dell Desktop returns Dell Laptop, Dell Desktop, HP Desktop.
결과를 제한하지 않습니다 어떻게 것 단일 검색 결과 만 반환하도록 결과를 제한 하시겠습니까?