1 - Default Behaviour

Learn about how Raffle API search results work by default, their limitations, and why customization can improve user experience.

When using the Raffle API, search results are designed to be fast and accurate, retrieving the most relevant parts of your content based on the user’s query. However, the default behavior of the API may not always produce results that look cohesive or polished, especially in terms of descriptions. This step explains the default behavior of search results, their limitations, and why customization may improve your user experience.


Default Search Results

By default, the Raffle API analyzes your content and returns the most relevant sections as search results. These sections are the parts of a document or webpage that match the user’s query. While this ensures accuracy, the descriptions in search results can sometimes feel incomplete or disjointed because they are directly extracted from larger bodies of text.

For example, a default search result might include:

“Dedicated support. Case studies around AI - use have been collated by…”

This snippet matches the query but might lack important context, such as what “case studies” refers to or where to find additional information.


Challenges with Default content

The content field in search results focuses on relevance to the user’s query, but it has some limitations:

  1. Lacks Context: Results may not provide sufficient background for users to understand the full scope of the content.
  2. Incomplete Snippets: Extracted text can start mid-sentence or leave out important information.
  3. Unpolished Appearance: Descriptions might not meet the standards of a professional user experience.

This can result in accurate but less intuitive search results.


Why Customize Search Results?

Customization allows you to enhance search results by adding metadata, improving their relevance and appearance. Benefits include:

  1. Improved Readability: Replace text snippets with clear, structured summaries.
  2. Additional Context: Include extra information, such as publication dates, categories, or images.
  3. Better Alignment: Tailor results to match your application’s branding and style.

By using CSS Metadata Selectors, you can extract specific details from a webpage, such as:

  • Meta descriptions for concise summaries.
  • Open Graph images for visual context.
  • Publication dates to highlight content freshness.

These enhancements make results:

  • Cohesive, with complete descriptions.
  • Informative, adding useful context.
  • Visually Engaging, with relevant images and details.

What’s Next?

Now that you understand the limitations of default search results, move to Step 2: Configuring CSS Metadata Selectors to learn how to set up and use metadata for richer, more polished results.