Troubleshooting: Product sequencing issues
Set a predefined order for the appearance of your products in WebSphere Commerce Search results.
Problem
Products returned by searches do not appear in the order you prefer.
Solution
Sequencing allows you to set a predefined display order for products in a category. You can set a sequence value for each product. When browsing categories, you will want to order products in a way that will drive the most sales.
- For Feature Pack 6: JR54466;
- For Feature Pack 7: JR53713;
- Feature Pack 8: JR56287 (Cumulative Fix #3).
- Shallow Sequencing: Determining sequence of results based on product's sequence
value.
Shallow sequencing is normally used when you are not using deep search (showing products under category and it's subcategories), but can also be used with deep search if you don't want the category's sequence value to be taken into account.
- Deep Sequencing: Determining sequence of results based on the product and category's
sequence value.
Deep sequencing allows the category sequence value to be taken into account so that products under a category with a low sequence value can be pushed to the top of the results. It's important to know what sequencing behaviour you want for your storefront, as each type of sequencing can result in significantly different results.
Shallow Sequencing: sort=getSequenceByCatalogAndCategory(sequence,'catalogId','categoryId') asc
Deep Sequencing: sort=getDeepSequence(globalSequence,catalogId,categoryId) asc
- Ensure that the EnableDeepProductSequence parameter is correctly set in the
Search_eardir/xml/config/com.ibm.commerce.catalog/wc-component.xml
file.
<_config:property name="EnableDeepProductSequence" value="false" />
- The correct sequencing function parser must be defined for each sequencing
function.
<valueSourceParser name="getSequenceByCatalogAndCategory" class="com.ibm.commerce.foundation.internal.server.services.search.function.solr.SolrSearchGetSequenceByCatalogAndCategoryFunctionParser" /> <valueSourceParser name="getDeepSequence" class="com.ibm.commerce.foundation.internal.server.services.search.function.solr.SolrSearchGetDeepSequenceFunctionParser" />
q=*:*&fq=parentCatgroup_id_search:catalogId_categoryId&fl=catentry_id,sequence&rows=100
You
can verify in the response whether the catentry_ids being returned have the expected sequence
values.
<response>
<lst name="responseHeader">
<int name= " status ">0</int>
<int name="QTime">1</int>
<lst name="params">
<Str name="q">*:*</str>
<str name="fl">catentry_id,sequence</str>
<Str name="rows">100</str>
<Str name= "fq ">parentCatgroup_id_search: 10101_10118</str>
</lst>
</lst>
<result name="response" numFound="88" start="0">
<doc>
<arr name="sequence">
<str>10101_10118_1.000000</str>
<str>10152_10118_1.000000</str>
</arr>
<str name="catentry_id">15316</str>
</doc>
...
<doc>
<arr name="sequence">
<str>10101_10118_1.880000</str>
<str>10152_10118_1.880000</str>
</arr>
<str name="catentry_id">15404</str>
</doc>
</result>
If
the wrong sequence values are being indexed, then check whether the preprocessing functions are
retrieving the correct sequence values from the database. You can review the contents of the
TI_CATGPENREL_#indexScopeTag# to confirm that the sequence value for the catentry
matches what you see in Management Center. If this table does not have the correct sequence value,
then review the query you are using in wc-dataimport-preprocess-common.xml to
retrieve data for the table.If the correct sequence values are being indexed, review the results to confirm that the sequencing function is sorting the results properly.