DEV Community

Daniel
Daniel

Posted on

Search Engine - System Design optimal solution

Search engines are built to help users find relevant resources based on an inputted search query. In our case, our search engine needs to scan, organize and serve relevant urls to users in a timely manner.

Most search engines require us to organize the search data in a way that allows users to quickly get their results, and ours is no exception. The secret to this problem is understanding that we need to preprocess the data to make it more easily searchable.

Functional Requirements

  • 10 relevant results should be returned for each query if they exist
  • When a user clicks on a result they should be sent to the page
  • A "good match" is when a url contains a specific keyword
  • Searches can only consists of a single keyword
  • All grammatical tenses should map back to the same base words
  • All "stop words"( a, an, you, or ,etc.) should not be included in the index
  • Urls should be checked daily for updates
  • Urls do not need to be ranked off of any relevancy

How would you design this system?

Optimal Solution

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay