How to perform a AEM Full Text Search for a keyword? | Community
Skip to main content
New Participant
September 5, 2024
Solved

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

  • September 5, 2024
  • 3 replies
  • 1625 views

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
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by HeenaMadan

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!

3 replies

kautuk_sahni
Employee
September 13, 2024

@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
HeenaMadan
HeenaMadanAccepted solution
New Participant
September 5, 2024

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!

Ameen_DevAuthor
New Participant
September 5, 2024

Thanks! Let me try.

h_kataria
New Participant
September 5, 2024
Ameen_DevAuthor
New Participant
September 5, 2024

Hi @h_kataria,

Thanks. It's not working.