Changing the relevancy of search index fields
Depending on your store catalog, some search index fields might be more relevant than others for when shoppers search in the store. You can fine-tune the relevancy of search index fields to improve search results that are based on your store catalog. The relevancy can be scoped to either the site level or to the category level.
The following table shows sample relevancy values
assigned to search index fields:
Search index field | Default relevancy value |
---|---|
categoryname |
100.0 |
partNumber_ntk |
15.0 |
mfName |
10.0 |
name |
10.0 |
shortDescription |
5.0 |
shortDesc_suggest |
1.0 |
partNumber_suggest |
1.0 |
name_suggest |
1.0 |
defaultSearch |
1.0 |
Tip: If your business users enter catalog information into the long description
field instead of the short description, you might want to work around this issue by copying the
information into the first few lines of the long description to quickly generate the short
description. Then, boosting is applied accordingly to the short description.
Before you begin
Procedure
-
Run a keyword search in the storefront and identify the search results that you want to
improve.
For example, your catalog might result in displaying more relevant search results lower than you want them to appear.
-
Update the SRCHPROPRELV table and change the
relvalue
for the search field you want to change the relevancy for: - Perform the same keyword search again in the storefront and compare the search results with the initial search results. Continue to update search relevancy values to optimize the search results.
Example
Color
and
Size
attributes at the site level to 10.0
update srchproprelv set relvalue = 10.0
where srchproprelv_id in (select srchproprelv_id from srchproprelv
where indexfield in (select lower(srchfieldname) from attrdictsrchconf
where attr_id in (select attr_id from attr where identifier in ('Color', 'Size'))));
Color
attribute at the
Dresses
category level:- Query the information for colors in your
store:The values are:
The returnedselect attrdict_id, storeent_id from attrdict where storeent_id=asset_store_id
attrdict_id
value is then used in the following query:select * from srchproprelv where indexfield in (select srchfieldname from attrdictsrchconf where attr_id in (select attr_id from attr where identifier in ('Color') and attrdict_id=returned_attrdict_id));
- catalog ID
10001
storeent_id
10051
indexfield
ads_f32
- Query the
catgroup
ID from CATGROUP:
The resultingselect * from catgroup c, storeent s where c.member_id = s.member_id and storeent_id in (select storeent_id from storecat where catalog_id=10001) or storeent_id in (select RELATEDSTORE_ID from storerel where STORE_ID in (select storeent_id from storecat where catalog_id=10001) and STRELTYP_ID=-4) and c.identifier='Dresses';
catgroup
ID is10006
. - Insert the new record into SRCHPROPRELV. For example, to increase the relevance to
10.5
:Note: You must use asrchproprelv_id
value that is less than-10000
, as the upper range is reserved for HCL internal use.insert into srchproprelv (srchproprelv_id, catgroup_id, catalog_id, storeent_id, relvalue, indexfield) values (-10001,10006,10001,10051,10.5,'ads_f32');