Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

jcr:score criteria

Avatar

Level 4

Hi,

What is the ordering criteria used by jcr:score property in Querying?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @kirthim 

 

  • The jcr:score property is calculated using the FulltextSearch query function in AEM.
  • The score is based on the number of times the search terms appear in the node's properties, the proximity of the terms to each other, and other relevance factors.
  •  

Importance of jcr:score in AEM queries:

  • jcr:score is important in AEM queries because it allows you to sort the query results by relevance.
  • Sorting by jcr:score ensures that the most relevant nodes appear at the top of the search results.

Aanchal Sikka

View solution in original post

2 Replies

Avatar

Employee Advisor

Hi @kirthim ,


It represents the full-text search score of the node, which is a measure of the node's relevance to the full-text search expression.

 

More implementation details here:-
https://docs.jboss.org/modeshape/2.6.0.Final/manuals/reference/html/jcr-query-and-search.html 

https://lucene.apache.org/core/3_0_3/api/core/org/apache/lucene/search/Similarity.html 

 

Hope this helps!

Regards,

Avatar

Correct answer by
Community Advisor

Hello @kirthim 

 

  • The jcr:score property is calculated using the FulltextSearch query function in AEM.
  • The score is based on the number of times the search terms appear in the node's properties, the proximity of the terms to each other, and other relevance factors.
  •  

Importance of jcr:score in AEM queries:

  • jcr:score is important in AEM queries because it allows you to sort the query results by relevance.
  • Sorting by jcr:score ensures that the most relevant nodes appear at the top of the search results.

Aanchal Sikka