Expand my Community achievements bar.

Fulltext search for nested containers do not work

Avatar

Level 2

Below is the scenario
On pageA I have a text component as in below heirarchy.
Container -> Container -> Text.
And on pageB I have text component on Container -> Text.
I have written a fulltext query to search a keyword. It should return me all the pages that has that keyword. AEM returns me pageB but not pageA as the keyword is inside the nested container.

Fulltext Query
type=cq:Page
path=/content/demo
fulltext=herbs
fulltext.relPath=.

Please advise.

17 Replies

Avatar

Level 2

Hi @DikshaBa1 ,

Can you please try with below query:
path=/content/<path>
fulltext=SampleText.

I tried this in we retail and it does fetch text from all levels of container

NavyaSri_M_0-1738654700809.png

 

Avatar

Level 2

Tried it but still fetches same results. The page with nested container is not listed in the results.
I am using AEMaaCs. Any change is needed?

Avatar

Level 2

Can you please remove type=cq:Page from the query and try

Avatar

Level 2

Results

Number of hits: 0

Time: 0.00 seconds

No hits if I remove type=cq:Page

Avatar

Community Advisor

HI @DikshaBa1 

Can you remove fulltext.relPath predicate from query and try?

 



Arun Patidar

Avatar

Level 2

DikshaBa1_0-1738655804839.png

Same result.

Avatar

Level 2

DikshaBa1_0-1738655871202.png

Component setting inside the page

Avatar

Community Advisor

By default, the full-text search filters operate up to a depth of 3 levels (/oak:index/cqPageLucene/aggregates/cq:PageContent). If your JCR content hierarchy extends beyond this depth relative to jcr:content, you should include additional criteria such as include4, include5, and so forth or create a custom Lucene index.

Reference:
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fulltext-search/m-p/701705...
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/quick-search-component-not...

 

Avatar

Level 2

Below is my JCR content heirarchy

DikshaBa1_0-1738665854547.png


Added nodes to the cq:PageContent to include additional criteria such as include4, include5 and include6. But results fetched in the query builder are the same. Am I missing some other configuration?

DikshaBa1_1-1738665971850.png

 

 

 

Avatar

Community Advisor

You may need to reindex cqPageLucene (/oak:index/cqPageLucene) node. This can be done by updating the reindex property to "true".

Avatar

Community Advisor

Hi @DikshaBa1 ,

You may check if any custom lucene index available in project which might be override the functionality.

Reference https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/references-showing-zero-in...
Thanks

Avatar

Level 2

Hi @DikshaBa1 ,

You can use query performance URL and go to explain query tab where you run your query and check which index is being picked up and can further check if includes were added in that particular index or not.

Avatar

Level 2

DikshaBa1_0-1738673071819.png

I am not able to find any references of includes added in Logs or query explanation.
After adding the include6 nodes is there some reindexing that needs to be done? If yes, could anyone please list down the steps?

 

Avatar

Level 2

Reindexing can be done in 2 ways. One way is changing the reindex property on node to true and save it. It will reindex and update its value to false again. 

You can refer this link for detailed step by step process-https://blogs.perficient.com/2017/04/19/rebuild-indexes-in-aem-with-oak-index-manager/ 

Avatar

Level 4

can you please try the following

 

type=cq:Page
path=/content/demo
fulltext=*herbs*

 

Also can you please create a custom index(use https://oakutils.appspot.com/generate/index) for it and try it?

Avatar

Administrator

@DikshaBa1 Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Level 2

resolved the issue with below solution

 

DikshaBa1_0-1740115734750.png

Added another node include4 and updated the path.

Modified property "reindex" to true of cqPageLucene.