What drives the search results? | Community
Skip to main content
Level 2
July 26, 2016
Solved

What drives the search results?

  • July 26, 2016
  • 2 replies
  • 1375 views

Have a question regarding the search functionality within AEM Assets. When conducting a search that returns say 100 assets, how are those assets sorted by default? For example, is it number of times that my search criteria appeared in each assets' entire metadata? Does AEM look at certain fields first before moving on to the entire schema (i.e. Title/Description first)?

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 srijanb86428858

The default sort order is decided on the basis of relevance score calculated by Lucene.

See https://lucene.apache.org/core/3_6_0/scoring.html for more info about Lucene scoring.
 

2 replies

smacdonald2008
Level 10
July 26, 2016

I checked with internal Adobe experts - they stated:

CALLER: com.day.cq.search.impl.builder.QueryImpl.executeXpath(QueryImpl.java:391)

QUERY: /jcr:root/content/dam//element(*, dam:Asset)[jcr:contains(., 'square')]

PLAN: [dam:Asset] as [a] /* lucene:damAssetLucene(/oak:index/damAssetLucene) +(full:jcr:content/metadata/dc:title:square^2.0 :fulltext:square) +:ancestors:/content/dam ft:("square") where (contains([a].[*], 'square')) and (isdescendantnode([a], [/content/dam])) */

 

Shameless plug for AEM Chrome Plug-in [1] … makes it really easy to data-mine this info.

 

[1] http://adobe-consulting-services.github.io/acs-aem-tools/aem-chrome-plugin/

srijanb86428858Accepted solution
Level 2
July 28, 2016

The default sort order is decided on the basis of relevance score calculated by Lucene.

See https://lucene.apache.org/core/3_6_0/scoring.html for more info about Lucene scoring.