The XSearch Sandbox provides an environment to experiment with XGEN AI’s search API, allowing you to try various settings and observe the outcomes of different configurations. To use it, just enter your search query and press enter or click the send icon on the right of the textbox. This action triggers the API call with your specified query.
Type To Search
Activating this feature will turn on XGen's type-to-search API, which displays recommendations as the user types. With each character entered, users will receive search results corresponding to their input thus far.
Locale
The locale dropdown allows you to choose from any of the locales/catalogs set up in XGen's system. Selecting a locale will restrict search results to products available in that specific collection and also limit the triggerable keywords to those configured for that particular collection.
Engine/Experience
This dropdown enables you to switch the engine governing the search results. Choosing an engine activates the one created in the Engine Composer, and any searches will utilize its settings.
You can also select a experience from this dropdown. Opting for a experience applies both the engine and filters configured in the experiences section, offering a search experience closest to what you would encounter live on the site.
If you select a experience with a context-based filter, a button will appear below the dropdown for configuring the context. A popup will emerge, presenting each contextual variable for you to assign values, which are then set for those variables. If you choose a context-using experience, the filter will accept any value by default for each variable essentially disabling the filter.
Next to the dropdown, an edit button is available, providing direct access to the section for editing the currently selected engine or experience.
Search Results
When you enter a query, a message will appear in the chat window displaying the query you searched for, the selected locale, and the engine/experience used for that search. After the search API responds, the results will be presented in a carousel format, showcasing basic information such as the product's image, name, and price. Clicking on a product will open a raw JSON view with all the available information for that product. Additionally, clicking the link icon next to the product name will open the product's detail page in a new tab.
Clearing the Cache for a Specific Search / Filter Combination
If you have selected a experience that is linked to a filter, you can also directly clear the cache for that filter, with or without a specific context provided. For example:
Select an experience and perform a search
Go to the experience details
Clear the experience/ deployment filter cache