Hi community,
i'm working on a client new website.
the existing website in also on AEM 6.5 and the new it's a version with new feature.
current site is mapped on:
/content/currentSite/*
and the new on:
/content/newSite/*
I have the question about the suggestion query:
1) in the new site, i need to index also to extend the suggestion on jcr:description.
How can i extend the index in order to achive the result?
Can I extend the existing /oak:index/cqPageLucene/indexRules/cq:Page/properties introducing the new node like:
{
"jcr:primaryType":"nt:unstructured",
"nodeScopeIndex":true,
"useInSuggest":true,
"propertyIndex":true,
"useInSpellcheck":true,
"name":"jcr:content/jcr:description",
"type":"String"
}
?
Is it a best practice extend existing index? in case of yes, how can i deploy it (including in the solution the index override or installing through package manager)
2) My localhost suggest results are different than the client's environment. Using for example the <brand> word, the client environment has returned 0 results but my localhost 10 result.
Log file are not report warning message.
Investigating, I discovered that IF i installing also the currentSite content on in my localhost environment, i'm getting the same result of client environment.
Below the index status before and after the currentSite content.
Without currentSite content | /oak:index/cqPageLucene => VALID Size : 6.7 MB Time taken : 5,754 ms
| 10 result on localhost |
With currentSite content | /oak:index/cqPageLucene => VALID Size : 19.3 MB Time taken : 48,86 ms
| after reindex, i get 0 result. |
If i delete (in incremental mode .. 20%; 40%; 60%; 80%; 100%) the currentSite content, in progress mode (after the reindex) i get one or more results.
Have some idea about? why this behaviour? is it documented in order to understand the reason and discussing it with the client?
thanks in advanced!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @davidef34326447,
You can extend existing index and can have as part of ui.apps module (have a specific filter entry say, /oak:index/cqPageLucene in META-INF/vault/filter.xml of ui.apps module)
We might have to look for product updates (if you are to install SP or CFP) - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/extend-default-oak-index-o...
Regarding Suggestion results, can you let know if the query is on the root or you are using ISDESCENDANTNODE/path restriction.
If it is the latter, there is a chance of 0 results/suggestions if the filtered suggestions(usually 10) are not part of that path.
Example :
Query below is returning 10 suggestions and is not from any of the content pages (as evident from the result)
SELECT [rep:suggest()], [jcr:path], [jcr:score] FROM [cq:Page] WHERE SUGGEST('exp')
Result :
Now, If I add ISDESCENDANTNODE('/content/we-retail') to this query, then I will get 0 suggestions. (In other words, above 10 suggestions are not from /content/we-retail and hence 0 suggestions)
More about Suggestions from official doc (Can consider using Analyzed Suggestions too ) : https://jackrabbit.apache.org/oak/docs/query/lucene.html#Suggestions
Hi @davidef34326447,
You can extend existing index and can have as part of ui.apps module (have a specific filter entry say, /oak:index/cqPageLucene in META-INF/vault/filter.xml of ui.apps module)
We might have to look for product updates (if you are to install SP or CFP) - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/extend-default-oak-index-o...
Regarding Suggestion results, can you let know if the query is on the root or you are using ISDESCENDANTNODE/path restriction.
If it is the latter, there is a chance of 0 results/suggestions if the filtered suggestions(usually 10) are not part of that path.
Example :
Query below is returning 10 suggestions and is not from any of the content pages (as evident from the result)
SELECT [rep:suggest()], [jcr:path], [jcr:score] FROM [cq:Page] WHERE SUGGEST('exp')
Result :
Now, If I add ISDESCENDANTNODE('/content/we-retail') to this query, then I will get 0 suggestions. (In other words, above 10 suggestions are not from /content/we-retail and hence 0 suggestions)
More about Suggestions from official doc (Can consider using Analyzed Suggestions too ) : https://jackrabbit.apache.org/oak/docs/query/lucene.html#Suggestions
thanks @Vijayalakshmi_S !!
Views
Likes
Replies
Views
Likes
Replies