Issue

You search content but do not get any results although you have the content. The search should return a value for an atom which has indexinghint="exact."

You used the SearchService.createQuery method.

Solution

Use SearchService.createExactQuery instead of SearchService.createQuery.

Example:

SearchService ss = ServiceManager.getSearchService(); Query q = ss.createExactQuery(ticket, "word1_word2"); ResultSet res = q.execute();

Additional information

This issue occurs when the word that is indexed has a special character in it (for example an underscore). When you use the createQuery method, CQ parses the search term into different words (in the underscore case) and searches in the index. However, since your atom is indexed as an exact string, the query doesn't return any results.

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책