Welcome to Tech Mastery, your expert source for insights into technology and digital strategy. Explore topics like Adobe Experience Manager, AWS, Azure, generative AI, and advanced marketing strategies. Delve into MACH architecture, Jamstack, modern software practices, DevOps, and SEO. Our blog is ideal for tech professionals and enthusiasts eager to stay ahead in digital innovations, from Content Management to Digital Asset Management and beyond.
This tutorial explains the details on how to configure search collection in Adobe Search and Promote to support multiple environments through same account.
Collection in Search and Promote
The collections can be used to allow customers to search specific areas of a website so that they can quickly find what they are looking for.
For example, customers can search a collection of URLs that are related to product sales or to support services.
Each collection is specified on a single line with a name and a URL mask. A URL mask can consist of the following:
To make a mask a regular expression, you insert the keyword regexp between the collection name and the URL mask e.g FAQs regexp ^.*/faqs
The IndexConnector URL entry points can be referenced to the collection as below
QA regexp index:test-feed*
Each line in the Collections field can contain only one URL mask. However, you can specify multiple URL masks for the same collection name on different lines.
The collection=<Collection Name> e.g. collection=Support parameters specifies the collection to use for the search.This parameter maps to the sp_k backend search parameter, sp_k=<Collection Name> e.g. sp_k=Support
Configuring Collection
One of the best scenario to use the collection is indexing the data for multiple environments e.g QA, UAT etc into a same Adobe Search and Promote account, the collection parameters can be used to search the documents specific to the environment.
I am using the IndexConnector as a URL entry point to index the data through XML feed files but the URL entry points can be a website URL with links.
Refer the below URL for more details on configuring Index Connector.
Enable the IndexConnector for both QA and UAT data feeds, Settings → Crawling →Index Connector
Add the IndexConnector configurations to the URL entry points, Setting → Crawling → URL Entrypoints, the URL entry points can be configured as environment specific URL’s instead of IndexConnector
e.g
https://uat.example.com/search_index.html
https://qa.example.com/search_index.html
Configure the collection Settings → Searching → Collections, the collection can be also configured as environment specific URL masks
e.g.
UAT https://uat.example.com/products
QA https://qa.example.com/products
The configurations are ready, let us now run a Stage indexing (note the configuration are not pushed to live yet)
Index →Full Index →Staged Index →Run Full Index
The collections can be tested through collection page “Test Collections” option
Specify the search index URL, the index URL can be taken from Reports → Data Views →Default View, for index connector the URL is formed based on the primary key defined in IndexConnector definition(our case product id)
The search collection can be used to enable the user to search on a specific section of the website e.g products, materials etc . The collection functionality can be also used to enable the search functionality for different environments(e.g QA and UAT) in the same Adobe Search and Promote Account.
The dynamic facet is used to create new range selections automatically at the time of search. The facets are included dynamically based on the search result.
The Dynamic Facets feature is not enabled in Adobe Search&Promote, by default. Contact Technical Support to activate the feature for your use.
In our previous tutorial, we have seen how to enable static facet for the search results. Refer the below link for the details, the steps are going to be same for Dynamic facet with small changes.
Facets that are sparsely populated across your website and only appear for a subset of searches are good candidates to make dynamic.
In our example, the product with type “Watch” will have an additional attribute with name “size” and the facet associated with “size” is applicable only for the searches with keyword “Watch”.
The search with key word “Watch” will shows two facets “productType”(static) and “size”(dynamic) but the search with “Book” will shows only “productType”(static) facet.
Configuring Dynamic Facet
Some additional configuration required to enable Dynamic Facet compared to Static Facet(Refer Static facet tutorial for basic configurations)
Enabled additional product attribute to the feed file based on the product Type — “size”, “size” attribute is applicable only for the productType “Watch”
Create a new meta data definition for “size” field, Settings → Metadata →Definitions
Enable Dynamic Facet option for the metadata
Update the IndexConnector configurations with new meta data field “size”, Settings → Crawling →Index Connector
Configure facet with name “size” — there is no “Dynamic Facet” setting in Facet, only the configuration is in the underlying metadata configuration(already enabled), Design →Navigation →Facets
Configure a new Query Cleaning rule, Rules → Query Cleaning , to set the backend parameter “sp_sfvl_df_count”, the sp_sfvl_df_count parameter determines the total number of dynamic facet fields to return.
Update the back end transport with Dynamic Facet Support
The configuration can be pushed live after successful validation and run a live index →Full Index →Live Index →Run Full Index
The URL to access live data http://xxxxxxxxxxx.guided.ss-omtrdc.net/do=json&sp_q=Watch
The facet data in the response can be used to present the filtering options to users to narrow down the website search. The Dynamic Facet option enables the facets based on the search data.