AEM Search

Avatar

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile
bilal_ahmad
Level 4

09-09-2019

Dear Members,

My search is fetching me relevant results but when I search for a specific page(by searching the exact page title) It shows it in the 11th position. I want to show it as my first result(if the search query matches the jcr:title or asset jcr:content/metadata/jcr:title).

Here is my xpath query :

(/jcr:root/content/mySite/sites/en-us//element(*, cq:Page)[(not(jcr:content/@isNotSearchable)) and (jcr:contains(., 'My Test Page'))] | /jcr:root/content/dam/mySite/en_us/domain//element(*, dam:Asset)[(jcr:content/metadata/@mySite:assetGated != 'yes') and (jcr:contains(., 'My Test Page'))])

I'm using AEM6.4.4.

Any input would be appreciated,

Many Thanks in Advance!

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

09-09-2019

Avatar

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile
bilal_ahmad
Level 4

09-09-2019

Thanks a lot, Arun. Much appreciate your quick response. I have tried adding order by @jcr:title but it didn't work, shows the results in the same order

Avatar

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
berliant
Employee

Likes

207 likes

Total Posts

315 posts

Correct reply

98 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
berliant
Employee

09-09-2019

Did you try to use boost: Use Boosts | Indexing time and query runtime ?

Avatar

Avatar
Contributor
Employee
hamidk92094312
Employee

Likes

103 likes

Total Posts

240 posts

Correct reply

38 solutions
Top badges earned
Contributor
Shape 1
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Contributor
Employee
hamidk92094312
Employee

Likes

103 likes

Total Posts

240 posts

Correct reply

38 solutions
Top badges earned
Contributor
Shape 1
Ignite 1
Give Back 50
Give Back 5
View profile
hamidk92094312
Employee

09-09-2019

Can you verify if the same query written in SQL2 would output the results with proper ordering ? Is this isolated to XPATH ?

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

09-09-2019

Avatar

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile
bilal_ahmad
Level 4

10-09-2019

Thanks a lot for the valuable suggestion. I have added boost property for jcr:title but the results appeared in the same order I

When I add a property/node in my custom index, then it takes a lot of time to re-index. Any suggestion to make the reindexing go any quicker ? Many Thanks in advance!

Avatar

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile
bilal_ahmad
Level 4

10-09-2019

This should be the 'must read' for any team before implementing the search for their application. thanks Jörg

Avatar

Avatar
Give Back 10
Level 3
rachanam1547401
Level 3

Likes

14 likes

Total Posts

31 posts

Correct reply

1 solution
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile

Avatar
Give Back 10
Level 3
rachanam1547401
Level 3

Likes

14 likes

Total Posts

31 posts

Correct reply

1 solution
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile
rachanam1547401
Level 3

11-09-2019

You may want to try "out-of-band" indexing

Jackrabbit Oak – Oak Run Indexing

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,134 likes

Total Posts

3,161 posts

Correct reply

1,079 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

11-09-2019

Out-of-band indexing is an admin task, which loads the system. That is not a task you want a random author to trigger if he wants to change some parameter of site search indexing (e.g. adding synonyms or boost a certain keyword).