Iteration n° | 1 |
---|---|
Owner | @Anonymous |
Search personalization in action
Search personalization lets you boost search results based on user profiles, making results more tailored to individual behavior.
Not all users search the same way. Personalizing search results allows you to adapt relevance to each user’s context — their preferences, behavior, or intent — instead of showing the same ranked results to everyone. This leads to faster discovery, improved satisfaction, and better business outcomes.
For example, in an e-commerce site, someone who often shops for sportswear might see sneakers and activewear ranked higher when searching for “shoes,” while another user interested in luxury fashion might see designer heels or leather boots first.
Once the project using the prototype is set up, you can start testing the personalization. To do so include the personalize
search parameter in your query. personalize
must be an object with a single field, userContext
.
import { Meilisearch } from 'meilisearch'
const client = new Meilisearch({
host: 'yourMeilisearchCloudProjectUrl',
apiKey: 'yourMeilisearchCloudAPIKey',
})
const index = client.index('products')
const search = await index.search(
'wireless keyboard',
{
"personalize": {
"userContext": "The user prefers compact mechanical keyboards from Keychron or Logitech, with a mid-range budget and quiet keys for remote work."
}
)
userContext
⚠️ You are responsible for pulling and summarizing this data at search time, per user.
In a future version, we’ll support automatic generation of context based on search behavior.
You’ll need to generate a dynamically plain-text user description per request. This should summarize relevant traits, such as:
💡 Note: The re-ranking model is optimized to favor positive signals. It does not penalize negative phrasing or explicitly discarded intents. For best results, focus on affirmatively stated preferences, behaviors, and affinities.