<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: yosou</title>
    <description>The latest articles on DEV Community by yosou (@yosou).</description>
    <link>https://dev.to/yosou</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4136102%2Fc76a5575-fcbd-4b45-9ba5-08e7ee6dbeb3.png</url>
      <title>DEV Community: yosou</title>
      <link>https://dev.to/yosou</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yosou"/>
    <language>en</language>
    <item>
      <title>Searching 95,000 Telegram channels: what actually works for Chinese-language content</title>
      <dc:creator>yosou</dc:creator>
      <pubDate>Mon, 21 Sep 2026 16:26:18 +0000</pubDate>
      <link>https://dev.to/yosou/searching-95000-telegram-channels-what-actually-works-for-chinese-language-content-3fof</link>
      <guid>https://dev.to/yosou/searching-95000-telegram-channels-what-actually-works-for-chinese-language-content-3fof</guid>
      <description>&lt;p&gt;Telegram search is fine for finding a message in a chat you are already in. It is close to useless for finding a &lt;em&gt;chat&lt;/em&gt; — and if the content is Chinese, it gets worse in ways that are not obvious until you try to build something.&lt;/p&gt;

&lt;p&gt;I work on an index of public Telegram channels and groups for Chinese-speaking communities abroad, so I have spent a lot of time on this. Here is what actually works, what does not, and the traps I hit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Telegram search fails for discovery
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scope.&lt;/strong&gt; Search only covers chats you are a member of (plus some public username matches). There is no global index of public channels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chinese has no spaces.&lt;/strong&gt; Matching on "西游记4k蓝光" against a message containing "西游记 4K 蓝光" needs tokenisation, not substring matching. Naive &lt;code&gt;LIKE '%word%'&lt;/code&gt; misses most of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified vs Traditional.&lt;/strong&gt; 简体 and 繁體 are the same language written two ways. Users type one, channels post the other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Discovery spam.&lt;/strong&gt; Once you do build an index, the top results fill up with channels that game whatever signal you expose.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What works
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;t.me/s/&amp;lt;channel&amp;gt;&lt;/code&gt; is the public web mirror
&lt;/h3&gt;

&lt;p&gt;For public channels, &lt;code&gt;https://t.me/s/&amp;lt;channel&amp;gt;&lt;/code&gt; renders the last ~20 posts as plain HTML — no login, no API key. Pagination is &lt;code&gt;?before=&amp;lt;message_id&amp;gt;&lt;/code&gt;, and the HTML is stable enough to parse. This is how you read a channel without joining it.&lt;/p&gt;

&lt;p&gt;Caveat: it works for &lt;em&gt;public channels&lt;/em&gt; only, and it gives you recent posts, not history.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Store the users' language, not just the text
&lt;/h3&gt;

&lt;p&gt;For Chinese, the trick is to normalise before you index: convert Traditional to Simplified, split CJK into bigrams (&lt;code&gt;西游记&lt;/code&gt; → &lt;code&gt;西游&lt;/code&gt;, &lt;code&gt;游记&lt;/code&gt;), and keep latin/digits as whole tokens (&lt;code&gt;4k&lt;/code&gt;, &lt;code&gt;蓝光&lt;/code&gt;). Then you can run a real inverted index (SQLite FTS5 or Meilisearch) instead of &lt;code&gt;LIKE&lt;/code&gt;. Recall goes up dramatically for mixed queries like &lt;code&gt;西游记4k蓝光&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Rank on things that are hard to fake
&lt;/h3&gt;

&lt;p&gt;Four signals, in this order, worked for us:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;text relevance&lt;/strong&gt; (BM25 over the inverted index),&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;recency&lt;/strong&gt; (a channel that posted today beats one dormant for a year),&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;channel quality&lt;/strong&gt; (subscriber count, message count, media ratio — computed from what we crawl),&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;views&lt;/strong&gt; (per-post view counts, which are visible on the &lt;code&gt;t.me/s/&lt;/code&gt; mirror).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is it. No manual boosts, no paid placement. This is not a moral stance so much as a practical one: the moment a ranking position is for sale, the index fills with whoever pays, users notice within a week, and the search stops being useful.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Expect to fight junk
&lt;/h3&gt;

&lt;p&gt;Crypto "招商" channels, pirated-media dumps and affiliate spam are a large share of what you will crawl. Some practical filters: minimum subscriber threshold, media-to-text ratio, duplicate-title detection across channels, and a hard cap on how many results any single channel can occupy.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we ended up with
&lt;/h2&gt;

&lt;p&gt;We index about &lt;strong&gt;95,000 public channels and groups&lt;/strong&gt; and roughly &lt;strong&gt;675,000 messages&lt;/strong&gt;, and expose it two ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a Telegram bot (&lt;code&gt;@yosou&lt;/code&gt;) for query-in-chat, and&lt;/li&gt;
&lt;li&gt;a web entry point at &lt;a href="https://yosou.pro/" rel="noopener noreferrer"&gt;yosou.pro&lt;/a&gt; that works without Telegram — useful when someone shares a link outside Telegram.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because "who runs this channel" is usually more useful than any single post, we also publish a &lt;a href="https://yosou.pro/c/" rel="noopener noreferrer"&gt;directory of the people behind the indexed channels&lt;/a&gt; — each page shows the channel owner, the channels they hold, and subscriber counts. It is a plain server-rendered page, so it opens from any browser without an account.&lt;/p&gt;

&lt;p&gt;Search is deliberately boring: BM25 + freshness + channel quality + views, four signals, all computed from public data.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you are building something similar
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Start with &lt;code&gt;t.me/s/&lt;/code&gt; mirrors for ingestion; they are cheap and legal-ish for public channels (respect rate limits and &lt;code&gt;robots.txt&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Do the Chinese-aware tokenisation &lt;strong&gt;before&lt;/strong&gt; you index, not at query time — otherwise every search pays the cost.&lt;/li&gt;
&lt;li&gt;Keep a "why ranked here" explanation per result. Users trust a search that can explain itself, and you will need it yourself when debugging recall.&lt;/li&gt;
&lt;li&gt;Do not sell ranking. Everything else is negotiable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy to answer questions about the ingestion or tokenisation side — the interesting bugs are all in the CJK edge cases.&lt;/p&gt;

</description>
      <category>telegram</category>
      <category>search</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
