Getting Started with Personalized Search

Personalized Search is an essential feature for any marketplace. It helps users find exactly what they're looking for, so they don't give up and go search for the product on another site.

Example for Getting Started with Personalized Search

Introduction

In this guide, we’ll discuss:

  • Defining personalized search
  • Customizing personalized search using Recipes
  • Implementing personalized search using APIs

Personalized search uses deep learning to connect users’ queries to results that are uniquely relevant to them. Unlike traditional search engines that retrieve and rank results solely based on term frequency, Miso’s Search Engine performs real-time relevancy ranking through the lens of a user’s own interests, preferences, and site interactions.

For instance, consider the various search results for “milk” on an online grocery store. Miso’s Search Engine learns that a customer who has an affinity for organic produce should see organic milk cartons at the top of their page and that a customer who has previously purchased dairy alternatives should see soy milk or oat milk in their results instead.

Using personalized search, two customers searching your e-commerce site may see different results for the same query – a paradigm shift that typically generates a 15-20% higher conversion rate for our partners (when compared to traditional search engines).

personalized_search_example1.png

personalized_search_example4.png

Customizing Personalized Search Using Recipes

Miso’s Search Engine is highly customizable - from incorporating merchandising strategies to layering mathematical functions for product rankings, our mission is to give you full control of the search experience.

All these features can be integrated to provide a comprehensive search experience. Recipes are a great way to familiarize yourself with how Miso’s Search Engine can be leveraged on your site. Here are some recipes to get started:

Implementing Personalized Search using APIs

The following steps assume you have already set up an engine for Search. If not, head over to the Quickstart guide to get started.

Basic Usage

Miso’s Search API provides personalized, typo-correcting search for your site. Simply send the user’s queries to the search endpoint and the API will return the relevant results tailored to the user.

As a basic example, suppose a user searches for “jeans”. The API request would look like the following:

POST /v1/search/search
{
  "q": "jeans",
  "user_id": "user-123"
}

In order to make accurate predictions, we require that you send the search query - q, along with the user id - user_id to the Search API at minimum. If a user is not signed in, you can alternatively send an anonymous_id (such as a hash of their IP address). If they eventually sign in, we will automatically reconcile their interaction data with their permanent profile.

The response would look something like this:

{
   "message":"success",
   "data":{
      "took":50,
      "total":30,
      "start":0,
      "miso_id":"f34b90de-086b-11eb-b498-1ee8abb1818b",
      "products":[
         {
            "product_id":"505-regular-fit-mens-jeans",
            "title":"The 505 Regular Fit Men's Jeans",
            "url":"https://levi.com/jeans/505-regular-fit-mens-jeans/",
            "size":"29",
            "material":"Cotton",
            "color":"Rinse - Dark Wash",
            "_search_score": 78.12,
            "_personalization_score": 0.98
         }
      ],
      "spellcheck":{
         "spelling_errors":false
      }

   }
}

The Flexibility of the Search API

Miso’s Search API can be highly customized - by implementing merchandising strategies, facet-filtering, diversification, and more.

For a more comprehensive example, let’s send the Search API the following request:

POST /v1/search/search
{
  "q": "jeans",
  "user_id" : "user-123",
    "rows" : 10,
    "fq" : "custom_attributes.gender:\"M\"",
    "boost_fq" : "brand:\"Levi's\"",
    "enable_semantic_search" : true
}

The search request will return 10 results (rows), be filtered to only include results that match a custom attribute from your product catalog (fq), boost results from Levi’s (boost_fq), and expand the query to include semantically similar terms like “denim” (enable_semantic_search). As you can see, including additional parameters in the API request body can tailor results for your business.

Automatic Spellcheck

Spellcheck is on for every search request by default. Unless explicitly specified, Miso will replace misspelled words in a user’s query before running it against your product catalog. For example, suppose a user searches for “whte denem jeans”. The API request would look like the following:

POST /v1/search/search
{
   "q":"whte denem jeans",
   "user_id":"user-123",
   "spellcheck":{
      "enable_auto_spelling_correction":true
   }
}

The API response would look like:

{
   "message":"success",
   "data":{
      "took":50,
      "total":30,
      "start":0,
      "miso_id":"f34b90de-086b-11eb-b498-1ee8abb1818b",
      "spellcheck":{
         "spelling_errors":true,
         "auto_spelling_correction":true,
         "original_query":"whte denem jeans",
         "original_query_with_markups":"<mark>whte</mark> <mark>denem</mark> jeans",
         "corrected_query":"white denim jeans",
         "corrected_query_with_markups":"<mark>white</mark> <mark>denim</mark> jeans"
      },
      "products":[
         ...
      ]
   }
}

Conversely, if enable_auto_spelling_correction is set to false, the user’s query will be used as-is, without any spelling corrections.

Additional Resources

For more information on Miso’s Search API, check out the official API Documentation.

For more recipes like this, visit the Recipes page on our Docs site.

Icon/Activity Icon/Add Icon/API Icon/Arrow/Down Icon/Arrow/Left Icon/Arrow/Right Icon/Arrow/TopRight Icon/Arrow/Up Icon/Bento Icon/Billing Icon/Bin Icon/Book Icon/Bookmark/Default Icon/Bookmark/Filled Icon/Calendar Icon/Caret/Down Icon/Caret/Up Icon/Chavron/DownIcon/Chavron/LeftIcon/Chavron/RightIcon/Chavron/UpIcon/Checknox/CheckedIcon/Checknox/Unchecked Icon/Checklist Icon/Chip Icon/Clipboard / Copied Icon/Clipboard/Default Icon/Clock/Stopwatch Icon/CMD Icon/Data/Catalog Icon/Data/Engine Icon/Data/Group Icon/Data/Interact Icon/Data/Users Icon/Dive Icon/Docs/Key Icon/Dojo Icon/Email Icon/Env/Development Icon/Env/Playground Icon/Env/Prod Icon/Folder Icon/Fullscreen/Collapse Icon/Fullscreen/Expand Icon/Guides/Multiple Icon/Guides/Single Icon/Hashtag Icon/Heart/Outline Icon/Heart/Solid Icon / Cart z Icon / Click Icon / Clock Icon / Data Icon / Doc Icon / EmptyCart z Icon/Social/Facebook Icon / Genome Incognito Icon / Money Icon/Social/ProductHunt Icon / Search Icon/Social/Twitter Icon / User Icon/Info/Error Icon/Info/Info Icon/Info/Question Icon/Info/Warning Icon/Interact/Download Icon/Interact/Edit Icon/Interact/External v2 Icon/Interact/External Icon/Interact/Filter Icon/Interact/Logout Icon/Interact/Options Icon/Interact/Re-order Icon/Interact/Reload Icon/Interact/Remove Icon/Interact/Replace Icon/Interact/Search Icon/Interact/Shuffle Icon/Interact/Undo Icon/Interact/Upload Icon/Interact/Video Icon/Invoice Icon/Loading Icon/Loading Icon/Lock/Locked Icon/Lock/Unlocked Icon/Lock Icon/Mapping Menu Icon/Notification Icon/Overview Icon/Person/Team Icon/Person/User Icon/Plan/Enterprise Icon/Plan/Growth Icon/Plan/Startup Icon/Plan/Trial Icon/Recipe Icon/Rocket Icon/Settings/App Icon/Settings/User Icon/Settings Icon/Shrine Icon/Sidebar/Close Icon/Sidebar/Open Icon/Slideout Icon/Sort/Ascending Icon/Sort/Default Icon/Sort/Descending Icon/Star/Filled Icon/Star/Outlined Stopwatch Icon/Support Icon/Tag Icon/Interact/Thumb/Dislike Icon/Interact/Thumb/Like Icon/Tick Icon/Trend/New Icon/Trend/Trending Icon/Tutorial Icon/Lock/Unlocked Icon/View/Grid Icon/View/List Icon/Watchlist/Add