<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[What2C.tv]]></title><description><![CDATA[What2C.tv is a free streaming search engine and watchlist. Find the best series and movies on Netflix, HBO Max, Apple TV, Prime Video and more, with IMDb ratings and where to stream.]]></description><link>https://what2c.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6afafb019bf191df591123b8/637f794d-2972-492c-944f-584691755905.png</url><title>What2C.tv</title><link>https://what2c.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 14:52:13 GMT</lastBuildDate><atom:link href="https://what2c.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How I Turned "Best Thriller Series on Netflix 2025" Into a Database Query]]></title><description><![CDATA[How What2C.tv turns searches like "best thriller series on netflix 2025" into a ranked list: normalizers, 43 intent types and empty-result bugs.]]></description><link>https://what2c.hashnode.dev/natural-language-search-best-series-on-netflix</link><guid isPermaLink="true">https://what2c.hashnode.dev/natural-language-search-best-series-on-netflix</guid><category><![CDATA[Next.js]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[search]]></category><category><![CDATA[webdev]]></category><category><![CDATA[side project]]></category><dc:creator><![CDATA[Ofer]]></dc:creator><pubDate>Mon, 16 Nov 2026 12:56:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6afafb019bf191df591123b8/04466e46-e754-4f6a-ab14-234fe234f198.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I build <a href="https://what2c.tv">What2C.tv</a>, a free streaming search engine for series and movies. The heart of the product is one search box. You type what you'd say to a friend ("best thriller series on netflix", "movies directed by Christopher Nolan", "shows like Severance") and get a ranked list where every result shows its IMDb rating and the streaming services that carry it in your country.</p>
<p><strong>The short answer:</strong> the query is cleaned up (years, ages and words like "new" are rewritten), then matched to exactly one of 43 typed intents, such as "best series on a service in a year, in a genre". Each intent runs its own ranked lookup. Most of the hard bugs weren't wrong answers but empty ones.</p>
<p>The search box is the easy part. Working out what the sentence <em>means</em> is where most of the work went. Here's how it works, and what broke along the way.</p>
<h2>Step 1: Normalize before you parse</h2>
<p>People type the same question in many shapes. Before any pattern runs, the query goes through a normalizer chain:</p>
<pre><code class="language-ts">normalizeQueryYears(normalizeQueryAges(normalizeQueryText(query)))
</code></pre>
<p>The year step does more than you'd think. All of these become the same range:</p>
<ul>
<li><code>2022-2025</code>, <code>2022 2025</code>, <code>from 2022 to 2025</code>, <code>2022 and 2025</code></li>
<li><code>90s</code>, <code>2020s</code>, <code>last 10 years</code>, <code>2024-25</code></li>
</ul>
<p>Recency words are rewritten too. "New", "recent", "just released" and "brand new" become the <strong>current year</strong>, so "new series on netflix" is really "best series on netflix 2026". The pattern only fires when a media word, genre or service follows, so titles like "New Girl" or "Brand New Cherry Flavor" still open as titles. The rewrite changes which kind of query it is, which is the next step.</p>
<h2>Step 2: Map the sentence to one intent type</h2>
<p>The parser returns one value of a TypeScript union. It has 43 members. A few of them (simplified):</p>
<pre><code class="language-ts">type StructuredSearchIntent =
  | { kind: 'best_series_by_year'; year: number }
  | { kind: 'best_series_by_platform_year'; platform: string; year: number }
  | { kind: 'best_series_by_genre_platform'; genre: string; platform: string; extraGenres?: string[] }
  | { kind: 'series_like_title'; title: string }
  | { kind: 'movies_with_person'; person: string; year?: number }
  | { kind: 'best_miniseries_by_year'; year: number }
  // ...37 more
</code></pre>
<p>So "best thriller series on netflix 2025" becomes a series intent with a genre (Thriller), a service (Netflix) and a year (2025). The kinds don't share one fetch-and-rank path, because "best of a year" and "best of a service" need different data.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6afafb019bf191df591123b8/101bb0f5-2923-4c32-b2b9-2342ddac90ae.png" alt="Searching sci-fi movies on netflix in What2C.tv" style="display:block;margin:0 auto" />
*"sci-fi movies on netflix" is read as a genre, a media type and a service.*

<p>Why a union and not one object with optional fields? Because the combinations aren't free. A year list and an all-time list need different ranking rules, and each kind carries exactly the fields it needs and nothing else.</p>
<h2>Step 3: Two genres mean AND</h2>
<p>"Best crime drama series" returns shows that are <strong>both</strong> crime and drama, not either. The genre is stored as <code>genre</code> plus <code>extraGenres</code>, but that's only a wire format. Every consumer folds them back into one set.</p>
<p>That turned out to be load-bearing. The search cache key is the normalized query, and for pure discovery queries the tokens are sorted. So "best sci-fi drama series" reaches the backend with "drama" first through the cache path and "sci-fi" first without it. Any code that treated "the first genre" as special would return different results for the same question depending on which cache layer answered. Rule: nothing may key on the first genre.</p>
<h2>Step 4: People and "like"</h2>
<ul>
<li>"movies with Tom Hanks", "series by Vince Gilligan", "written by Aaron Sorkin" become person intents. They're resolved to the person and return their work, best-rated first.</li>
<li>"shows like Severance" doesn't search for the word "Severance". It resolves the title, then uses a relatedness engine (recommendations plus keyword and same-universe probes). Relatedness comes first, and rating only breaks ties.</li>
</ul>
<p>The "like" path used to be a genre shortcut: take the seed's first genre and sort that genre by rating. So "series like breaking bad" returned Game of Thrones, Chernobyl and Band of Brothers, which are great shows but not like Breaking Bad. The tell was that the seed was excluded from its own results but showed up in another seed's, which is exactly what a rating sort over a shared genre pool does.</p>
<h2>The bugs that return nothing</h2>
<p>The worst search bugs don't crash. They return an empty grid and look fine. A few real ones:</p>
<table>
<thead>
<tr>
<th>Query</th>
<th>What went wrong</th>
</tr>
</thead>
<tbody><tr>
<td><code>movies like inception</code></td>
<td>Only series words were allowed before "like", so this parsed as a <strong>person</strong> named "like inception".</td>
</tr>
<tr>
<td><code>best 25</code></td>
<td>A number above 20 after "best", with no media word after it, is read as a year. <code>top 25 movies</code> works; we teach that form in the search tips.</td>
</tr>
<tr>
<td><code>something like Severance</code></td>
<td>The lead-in "something" wasn't a known media word, so nothing matched. Fixed by adding lead-ins and proving no real title gets hijacked (more below).</td>
</tr>
</tbody></table>
<p>Two habits caught most of these:</p>
<ol>
<li><strong>Run the parser, don't read the regex.</strong> Every row in our "what silently returns nothing" table was found by executing the parser on real phrasings.</li>
<li><strong>Diff against the whole title catalog.</strong> Before a new pattern ships, it runs over every title in our IMDb dataset (more than 56,000) to check that no real title now parses as something else. A film literally called "Something Like Summer" must still open as a title.</li>
</ol>
<h2>Step 5: Keep a fixed regression set</h2>
<p>A fix for one query can quietly break five others. We keep a fixed set of sample searches ("best series", "top drama series 2025", "top 2024", "best movies" and more) and diff the top results before and after every change that can touch ranking or parsing.</p>
<h2>Try it</h2>
<p>Here's the app in action:</p>
<p><a class="embed-card" href="https://youtu.be/UOQ5qKoU8RQ">https://youtu.be/UOQ5qKoU8RQ</a></p>

<p>These searches all go through the paths above:</p>
<ul>
<li><a href="https://what2c.tv/search?q=best%20thriller%20series%20on%20netflix">best thriller series on netflix</a></li>
<li><a href="https://what2c.tv/search?q=best%20series%20of%202025">best series of 2025</a></li>
<li><a href="https://what2c.tv/search?q=best%20crime%20drama%20series">best crime drama series</a></li>
<li><a href="https://what2c.tv/search?q=movies%20directed%20by%20Christopher%20Nolan">movies directed by Christopher Nolan</a></li>
<li><a href="https://what2c.tv/search?q=shows%20like%20Severance">shows like Severance</a></li>
</ul>
<p>Or browse the ranked genre lists, like <a href="https://what2c.tv/best/drama-series">the best drama series</a> or <a href="https://what2c.tv/best/sci-fi-series">the best sci-fi series</a>.</p>
<h2>What is What2C.tv?</h2>
<p>What2C.tv is a free streaming search engine and watchlist for series and movies, on the web and as an Android app. You search in plain words and every result shows its IMDb rating, its vote count and which streaming services carry it in your country. It has no ads and no paid tier. It's built with Next.js and Firebase, on an offline IMDb dataset plus TMDB, TVDB and TVMaze, with streaming availability from JustWatch.</p>
<h2>FAQ</h2>
<h3>How does What2C.tv understand a search like "best thriller series on netflix 2025"?</h3>
<p>It normalizes the text (years, ages, recency words), then maps the sentence to one of 43 intent types. That query becomes a series intent with a genre (Thriller), a service (Netflix) and a year (2025), and that intent runs its own ranked lookup.</p>
<h3>What does "shows like Severance" return?</h3>
<p>Titles related to Severance, found through recommendations, shared keywords and same-universe titles. Relatedness decides the order; the IMDb rating only breaks ties.</p>
<h3>Where do the ratings and streaming services come from?</h3>
<p>Ratings and vote counts come from an offline IMDb dataset, with TMDB, TVDB and TVMaze for details and seasons. Where each title streams comes from JustWatch, per country.</p>
<h3>Is What2C.tv free?</h3>
<p>Yes. Search needs no account, there are no ads and no paid tier. A free account adds a watchlist and new-episode alerts. It works in the browser and as an Android app.</p>
<p>If you've built natural-language search over a catalog, I'd like to hear how you handled the "returns nothing" class of bugs.</p>
]]></content:encoded></item></channel></rss>