pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Malik Rumi <malik.a.rumi@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Triggers and Full Text Search *
Date: Tue, 21 Apr 2020 21:45:42 +0200
Message-ID: <e8ac5ece0e546aa722e7e738d7e82f1ec416ce19.camel@cybertec.at> (raw)
In-Reply-To: <CAKd6oBwKQ1R-Nie7+5WjwpjRjqym-cZEA73Z7bNF=vnQ5GqTog@mail.gmail.com>
References: <CAKd6oBwKQ1R-Nie7+5WjwpjRjqym-cZEA73Z7bNF=vnQ5GqTog@mail.gmail.com>

On Tue, 2020-04-21 at 12:24 -0500, Malik Rumi wrote:
> More than a year ago, I implemented full text search on one of my sites.
> From the beginning, there was one problem (or at least, what I perceive
> to be a problem): when I use a script to insert many documents at once,
> they do *not* get indexed in fts. If a document is created or inserted
> one at a time, fts indexes immediately. The workaround I came up with
> was just to open each of those script inserted documents and then close
> them. As soon as they are opened, they get indexed. 

A trigger will fire and update the index immediately.

That opening and closing you are talking about does not sound like
a database activity.  Rather, it sounds like your software is delaying
the actual insert into the database, which would of course explain
why you cannot find it in the index.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (8+ messages)  latest in thread

Message-ID: <e8ac5ece0e546aa722e7e738d7e82f1ec416ce19.camel@cybertec.at>
Permalink:  ../e8ac5ece0e546aa722e7e738d7e82f1ec416ce19.camel@cybertec.at/
Also on:    postgresql.org/message-id/e8ac5ece0e546aa722e7e738d7e82f1ec416ce19.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, malik.a.rumi@gmail.com
  Subject: Re: Triggers and Full Text Search *
  In-Reply-To: <e8ac5ece0e546aa722e7e738d7e82f1ec416ce19.camel@cybertec.at>
  References: <CAKd6oBwKQ1R-Nie7+5WjwpjRjqym-cZEA73Z7bNF=vnQ5GqTog@mail.gmail.com> <e8ac5ece0e546aa722e7e738d7e82f1ec416ce19.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox