활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
Hi all,
I am trying to achieve predictive search (suggestions) on AEM 6.0 with Apache Jackrabbit Oak 1.0.22. Following OAK documentation, since Oak 1.0.15, we are able to find suggestions for a given query by using Apache Lucene. Moreover, I have created an extra index to able full-text search with suggestion on the jcr:description property (see picture):
I have a page whose jcr:description is "This is my query word within the page description"
My back-end code is something like that:
QueryManager qm = session.getWorkspace().getQueryManager();
String query = "SELECT [rep:suggest()] FROM nt:base WHERE [jcr:path] = '/content/myproject' AND SUGGEST('query')";
Query searchQuery = qm.createQuery(query, Query.SQL);
RowIterator it = searchQuery.execute().getRows();
I get no results and the logs shows: org.apache.jackrabbit.oak.query.ast.SuggestImpl No full-text index was found that can process the condition suggest([nt:base], cast('query' as string))
However, if I query like that:
queryMap.put("fulltext", "query");
queryMap.put("path", "/content/myproject");
final QueryBuilder queryBuilder = resourceResolver.adaptTo(QueryBuilder.class);
return queryBuilder.createQuery(PredicateGroup.create(queryMap), session);
I get result -> the page with the description.
Could anybody give me a clue about why the suggestion query is not working? Why doesn't OAK find full-text indexes if there are two of them, the OOTB 'lucene' and the custom one 'lucene-suggestion' created by me?
Many thanks, Salvador.
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
Do you verified description from below URL
조회 수
답글
좋아요 수
Do you verified description from below URL
조회 수
답글
좋아요 수
i'm also getting the same issue with Oak 1.0.15, please let me know if you are able to resolve this issue.
조회 수
답글
좋아요 수
Can you test this for any other word but query?
조회 수
답글
좋아요 수
Its a problem with keyword SUGGEST('any query value you may like to suggest')
조회 수
답글
좋아요 수
Hi Gokul,
Thanks for this link, the index cheatsheat is great. Following this instructions, this is the new index created:
The jcr:description node has the following properties:
1 | analyzed | Boolean | true | false | false | false | false |
2 | index | Boolean | true | false | false | false | false |
3 | jcr:primaryType | Name | nt:unstructured | true | true | false | true |
4 | name | String | jcr:description | false | false | false | false |
5 | useInSuggest | Boolean | true |
However, I still have no result and the logs keep showing:
org.apache.jackrabbit.oak.query.ast.SuggestImpl No full-text index was found that can process the condition suggest([nt:base], cast('keyword' as string))
Why OAK does not find a full-text index if a lucene index has been created?!
조회 수
답글
좋아요 수
Hi Amit,
As Sumantap said, the word 'query' was an example. It should be the user input. It throws this log all the time:
org.apache.jackrabbit.oak.query.ast.SuggestImpl No full-text index was found that can process the condition suggest([nt:base], cast('keyword' as string))
Cheers,
Salvador
조회 수
답글
좋아요 수
Hi Salvador,
I am also getting the same issue with AEM 6.0 SP3. Did you find any fix for the same?
Thanks
Ravinder
조회 수
답글
좋아요 수
Hi All,
I am also getting the same error. Could anyone let me know if you have the resolution for this.
Thanks,
Mayur
조회 수
답글
좋아요 수