Posts

Showing posts from September, 2021

Prioritize Search Results based on Boost in Lucene Index

Image
This short post explains the use of boost property in Index definition to prioritize the search results.  In Lucene Index, we have a property named boost   of type Double   which will help assign weightage to desired properties (that are part of fulltext/contains query) Properties with high boost value will be displayed earlier in the search results. Recently we had a query in the Community related to this subject to prioritize search term in URL to be first in the search results than the one found in properties like title/description.  In AEM, URL/path to the resource is simply the node names.  Node names are declared as property within the indexRules using special case identifier as   :nodename   and  is already available OOTB in cqPageLucene(/oak:index/cqPageLucene) Prerequisite for fulltext/contains query : We should make sure that we have two other properties named nodeScopeIndex and analyzed set to true (Both are of type "Boolean")...