AEM Search | Community
Skip to main content
bilal_ahmad
Level 5
Sep 9, 2019 8:09 AM UTC

AEM Search

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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

14 replies

bilal_ahmad
Level 5
Sep 16, 2019 10:08 AM UTC

Thank you so much, all for trying to help me. Apparently my segments were not proper and hence the indexes weren't getting created properly. After fixing that up, the boosting worked I was under the impression that if i'm doing a full-text search, boosting jcr:title doesn't work but that's not the case, it's working and the property is taking priority over other properties.

Translate
Level 3
Sep 15, 2019 10:56 PM UTC

I would look at using a tool like SOLR to handle searches:

Adobe Experience Manager Help | Integrating SOLR with Adobe Experience Manager 6.4

Translate
joerghoh
Employee
Sep 9, 2019 4:03 PM UTC
bilal_ahmad
Level 5
Sep 11, 2019 6:23 AM UTC

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

Translate
Employee
Sep 9, 2019 3:25 PM UTC

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

Translate
bilal_ahmad
Level 5
Sep 13, 2019 4:58 PM UTC

Yes, Hamid. It's fetching the results in the same order even with SQL2 query

Translate
Employee
Sep 9, 2019 12:05 PM UTC

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

Translate
bilal_ahmad
Level 5
Sep 11, 2019 6:20 AM UTC

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!

Translate
Level 3
Sep 11, 2019 8:28 AM UTC

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

Jackrabbit Oak – Oak Run Indexing

Translate
arunpatidar
New Participant
Sep 9, 2019 9:36 AM UTC
bilal_ahmad
Level 5
Sep 9, 2019 10:11 AM UTC

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

Translate