Guidelines and requirements you may want to consider as you implement search and navigation throughout your storefront.
Requirements Phase
Identify how many types of search are required for
the solution. For example, do you want different behavior or presentation
for different categories: top sellers versus clearance items or for
content assets versus products?
Paging
logic:
- Determine which pages show search
results.
- Determine how many search results to
show per page.
- Determine what happens when:
- No search results are defined for a
category or product
- Less than the planned number of
search results are defined for a category or product. For example,
you want to redirect a search to a category page or another page
to provide the user with more results.
- More than the planned number of
search results are defined for a category or product. For example,
you want the customer to be able to refine their search.
Sorting and ranking logic:
- Determine how many ways a customer might
want to sort results
- Determine whether you want to promote
specific products through search
- Determine what happens when:
- Multiple sorts are applied in a
specific order
- Ranking logic is applied to
reposition results after sorting
Indexing attributes:
- Identify what additional information is
required for indexing, so that customers can search on it. Every
attribute that is needed for indexing must be marked as
searchable.
- Identify required search features,
including:
- Category placement
- Search placement
- Search rank
- Text relevance boosting
Maintaining indexes:
- Identify how data for indexes will be maintained (for example,
import, manual, programmatic, or other):
- During development
- When the site is live
- If the merchant plans to manually create
search indexes in the Business Manager, identify:
- Who will be responsible for creating
them
- If there will be a review
process
- How they are tested
- How search indexes are replicated with catalog data
If the merchant plans to import search
index definitions, define the import process. If possible, implement it as
a job within Salesforce B2C Commerce, so that you can take advantage of
the scheduling and notification functionality built into B2C Commerce. If
you intend to perform regular index updates, these can also be scheduled
in Business Manager.
Design Phase
Operational Overhead
During the design phase, merchants should consider
the day-to-day operational overhead associated with creating and
maintaining search indexes manually within B2C Commerce, especially
merchants with large product catalogs. This process includes examining
current customer searches, identifying needed changes, configuring
dictionaries and indexes, and manually building and replicating
indexes.
Build Phase
Build code to
support search requirements.
Development/Test Phase
To
facilitate development and testing, you must:
- Create users with permissions that are in
line with merchant-defined business processes.
- Create an initial set of test search
results.
- Use a test plan to ensure that all use
cases are reviewed, including current Storefront searches, if
known.
- Test the import process, if
applicable.
Best Practices
Salesforce recommends the following best practices:
- Show all variations for sale; don't attempt to narrow the
results by variation using scripts to process search results. For example, if color is a
slicing attribute, show all iPods in all colors, don't attempt to iterate over the results
to pull out only pink iPods via scripts. While this can be done, it requires
post-processing of the full result set, which can impact the search performance. Instead,
it's recommended that you add a search refinement that lets the customer drill down a
specific selection.
- Any result processing that requires that you iterate through
all the results can make search a lot slower.
- Be careful when applying text relevance boosting. Because this
feature is site wide, it can have unexpected consequences if not applied with the full
search set in mind.
- Make sure that scheduled indexing is disabled when you
replicate index information from staging to production.
Performance Recommendations
If you have a large catalog of products and you want to improve the
speed of search, try to make the size of your indexes smaller. You can see the size of an
index after it's built on the Search >Search Indexes page. Usually, the number of
attributes being indexed is what determines index size. You can also add stop words to
decrease the size of the index.
However, if you decrease the number of searchable attributes, this
means that the search results might be less accurate.
If you have an average size catalog of products, decreasing index
size isn't normally a concern.
Testing Recommendations
We recommend testing the top 50–100 searches on your site as a
baseline to make sure that the search results are returned in the order that you prefer.