Property boosting in Search in CQ5 Version 5.5 SP2 not working
i have use-case in have boost properties higher score value in search. following rule section have used same.
<index-rule nodetype="nt:unstructured">
<property boost="10">dc:title</property>
<property boost="5">dc:description</property>
</index-rule>
i created sample data of 10 doc files in dam having below values title , description properties.
document 1:-
title: testword1 testword2 testword3
description: testword4 testword5 testword6
document 2:-
title: testword4 testword5 testword6
description: testword1 testword2 testword3
document 3:-
title: testword1 testword2 testword3
description: testword1 testword2 testword3
search term used: testword1
even property boosting in place score document 1 , document 2 coming same. ideally boosting in place order must have been:
- document 3
- document 1
- document 2
the complete indexing_config.xml used follows:
<?xml version="1.0"?>
<!doctype configuration system "http://jackrabbit.apache.org/dtd/indexing-configuration-1.2.dtd">
<configuration
xmlns:cq="http://www.day.com/jcr/cq/1.0"
xmlns:dam="http://www.day.com/dam/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sling="http://sling.apache.org/jcr/sling/1.0">
<!-- not index content of subassets -->
<index-rule nodetype="nt:resource"
condition="ancestor::subassets/@jcr:primarytype='{http://www.jcp.org/jcr/nt/1.0}unstructured'">
</index-rule>
<!--
exclude known properties node scope
fulltext index. not add rules below one, since
rule matches node , acts default/fallback.
-->
<index-rule nodetype="nt:base">
<property nodescopeindex="false">analyticsprovider</property>
<property nodescopeindex="false">analyticssnippet</property>
<property nodescopeindex="false">hideinnav</property>
<property nodescopeindex="false">offtime</property>
<property nodescopeindex="false">ontime</property>
<property nodescopeindex="false">cq:allowedtemplates</property>
<property nodescopeindex="false">cq:childrenorder</property>
<property nodescopeindex="false">cq:cugenabled</property>
<property nodescopeindex="false">cq:cugprincipals</property>
<property nodescopeindex="false">cq:cugrealm</property>
<property nodescopeindex="false">cq:designpath</property>
<property nodescopeindex="false">cq:iscancelledforchildren</property>
<property nodescopeindex="false">cq:isdeep</property>
<property nodescopeindex="false">cq:lastmodified</property>
<property nodescopeindex="false">cq:lastmodifiedby</property>
<property nodescopeindex="false">cq:lastpublished</property>
<property nodescopeindex="false">cq:lastpublishedby</property>
<property nodescopeindex="false">cq:lastreplicated</property>
<property nodescopeindex="false">cq:lastreplicatedby</property>
<property nodescopeindex="false">cq:lastreplicationaction</property>
<property nodescopeindex="false">cq:lastreplicationstatus</property>
<property nodescopeindex="false">cq:lastrolledout</property>
<property nodescopeindex="false">cq:lastrolledoutby</property>
<property nodescopeindex="false">cq:name</property>
<property nodescopeindex="false">cq:parentpath</property>
<property nodescopeindex="false">cq:segments</property>
<property nodescopeindex="false">cq:siblingorder</property>
<property nodescopeindex="false">cq:template</property>
<property nodescopeindex="false">cq:trigger</property>
<property nodescopeindex="false">cq:versioncomment</property>
<property nodescopeindex="false">jcr:createdby</property>
<property nodescopeindex="false">jcr:lastmodifiedby</property>
<property nodescopeindex="false">sling:alias</property>
<property nodescopeindex="false">sling:resourcetype</property>
<property nodescopeindex="false">sling:vanitypath</property>
<property isregexp="true">.*:.*</property>
</index-rule>
<!-- cq page jcr:contains(jcr:content, "...") searches -->
<aggregate primarytype="cq:pagecontent">
<include>*</include>
<include>*/*</include>
<include>*/*/*</include>
<include>*/*/*/*</include>
</aggregate>
<aggregate primarytype="dam:asset">
<include>jcr:content</include>
<include>jcr:content/metadata</include>
<include>jcr:content/metadata/*</include>
</aggregate>
<!-- nt:file child axis orderby index -->
<aggregate primarytype="nt:file">
<include>jcr:content</include>
<include>jcr:content/jcr:lastmodified</include>
</aggregate>
<!-- cq:page child axis orderby index -->
<aggregate primarytype="cq:page">
<include>jcr:content</include>
<include>jcr:content/cq:lastmodified</include>
</aggregate>
<!-- add project specific search indexing configuration here -->
<index-rule nodetype="nt:unstructured">
<property boost="10">dc:title</property>
<property boost="5">dc:description</property>
</index-rule>
<index-rule nodetype="dam:asset">
<property boost="10">dc:title</property>
<property boost="5">dc:description</property>
<property boost="20">inventorytype</property>
</index-rule>
</configuration>
hi alok sharma,
make sure
* project specific search indexing configuration added @ begining in indexing_config.xml
* rebuild index (in case verfying created assets)
* verify query using boost property + order score show impact on score value.
thanks,
sham
@adobe_sham
More discussions in Archived Spaces
adobe
Comments
Post a Comment