Skip navigation
Inverted indexes are the perfect structure for text search.
0:00 / 0:36

Inverted indexes are the perfect structure for text search.

Ben Dicken

@BenjDicken48K followers

Visit on X
535 likesDownloadOriginal post

32,297 views

Inverted indexes are the perfect structure for text search. "Inverted" here doesn't mean upside-down. Rather that it's an inversion of the original data. We take every distinct word from a set of documents and build a "posting list" of references back to every location where that word is used. When structured right, this lets databases like Postgres do fast lookup of words and phrases. TIN takes all this to the next level for Postgres. Span queries, fuzzy matching, wildcard matching, regex. All while strictly holding to Postgres durability, replication, and transactional semantics. Also, it's FAST. Who doesn't love a good benchmark?

10 Comments

Comments from the original post on X (Twitter)

  • Eddy's profile picture

    @eddy_builds

    FAST balls indeed

    4 likes

  • Rishabh Chauhan's profile picture

    @rishabhc32

    will you open source it?

    1 like

  • Ratul Dawar's profile picture

    @ratuldawar18

    But this doesn’t include like queries right?

    1 like

  • Ben Dicken's profile picture

    @BenjDicken

    The index is the structure for making searches fast. TIN has a complete syntax for specifying search queries, TINQL

  • Samantha's profile picture

    @SeoSamantha

    Hi Ben, just following up on the DM I just sent regarding a potential Bloomberg interview. Would love to hear from you when you get a chance.

  • shane borden 🛩️'s profile picture

    @sborden76

    How did you resolve the hot block 0 issue with regular GiN indexes. No more pending list? Fast update?

  • Darius Rey's profile picture

    @Xrey_Trading

    I Use it too I how I can Filter/orga my data in the cash (Looked by superbuffer)

  • Wanten's profile picture

    @WantenMN

    @grok 这个索引方式支持多字符串词组吗?

  • liprais's profile picture

    @liprais

    good idea,now try with chinese texts

  • Pankaj Kumar's profile picture

    @pankajkumarhq

    Half the teams I see bolt on Elasticsearch before they have 10k rows. Postgres was fine, Ben.