Expand my Community achievements bar.

SOLVED

How to perform a AEM Full Text Search for a keyword?

Avatar

Level 4

I am trying to perform a Full Text Search for a keyword(company name) using the below query and it gives the result but it brings the page URL where there is no search keyword(company name). And then I found out that it indexes the page URL that has company name in the meta tag and in the script URL. How to avoid the meta tag and the script URL that contains the search keyword(company name).

 

type=cq:Page
path=/content/company/language-master/en/demo
fulltext="company name"
p.limit=-1
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Ameen_Dev 

You need to refine your query like:

 


path=/content/..<your path>
fulltext=companyName
1_property=text
1_property.operation=exists
2_property=meta
2_property.operation=not //avoid search in meta
3_property=script
3_property.operation=not //avoid search in script
&p.limit=-1

for more precise search, you can add type=cq:PageContent

 

Hope this helps!

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

Hi @Ameen_Dev 

You need to refine your query like:

 


path=/content/..<your path>
fulltext=companyName
1_property=text
1_property.operation=exists
2_property=meta
2_property.operation=not //avoid search in meta
3_property=script
3_property.operation=not //avoid search in script
&p.limit=-1

for more precise search, you can add type=cq:PageContent

 

Hope this helps!

Avatar

Administrator

@Ameen_Dev Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni