I am using following query for fulltext search
type=cq:Page
path=/content/we-retail/en
fulltext=cricket
It is getting certain results which are not needed in the results. Is there a way to restrict the results.
thanks in advance
Views
Replies
Total Likes
Hey @vasimakram
You can use :
property.operation
- The operation you want to perform for the test. The available operations are equals
, unequals
, like
, not
, exists
.For example :
type=cq:Page
path=/content/we-retail/en
fulltext=cricket
property=formatODI
property.operation=not
Please let me know in case of any further assistance.
Thanks
property.operation = not will be used to check if property value is not equal to some value. It will not work for fulltext
Hey @vasimakram
I tried with exists and not and it worked perfectly fine.
Query 1 :
Shows all pages having keyword- 'car' and where editOption property exists
Query 2 :
Shows all pages having keyword- 'car' and where editOption property does not exist
Please let me know in case of further queries
This will work for property search. Not for full text search.
When I do fulltext search I am getting pages where this text is available. In one of the page I have used banner component. This component have one background image.
like
HTML: <img src="/content/dam/wknd/cricket-stadium.jpg"> <div>..........</div> </img> HTL: <img src="${properties.bgImg}"> <div></div> </img>
In this case the image path has my fulltext keyword. I wan't to ignore bgImg property from the results
Can you briefly explain your use case/requirement @vasimakram ? It'll make it easier to get to a solution.
Hi @vasimakram ,
You can also add a page property like a check box to hide in search. If that checkbox is enabled on the page then it will not show up in search results.
Modify the query to check for the property
type=cq:Page
path=/content/we-retail/en
fulltext=cricket
boolproperty=@jcr:content/hideInSearch
boolproperty.value=false
Hope this helps.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies