From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris <rc@networkz.ch>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_trgm vs. Solr ngram
Date: Fri, 10 Feb 2023 00:13:46 -0500
Message-ID: <4016890.1676006026@sss.pgh.pa.us> (raw)
In-Reply-To: <4628c3f6-e2c5-1484-71cf-62446cec984d@networkz.ch>
References: <4628c3f6-e2c5-1484-71cf-62446cec984d@networkz.ch>
Chris <rc@networkz.ch> writes:
> Or maybe hacking my own pg_trgm wouldn't be so hard and could be fun, do
> I pretty much just need to change the emitted tokens or will this lead
> to significant complications in the operators, indexes etc.?
See KEEPONLYALNUM in pg_trgm/trgm.h ...
Now, using a custom-modified pg_trgm module in production is likely
not something you want to do for long. It might be interesting to
look into whether the relatively-recently-invented "operator class
parameter" mechanism could be exploited to allow this behavior to be
customized without hacking C code.
regards, tom lane
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: tgl@sss.pgh.pa.us, rc@networkz.ch
Subject: Re: pg_trgm vs. Solr ngram
In-Reply-To: <4016890.1676006026@sss.pgh.pa.us>
References: <4628c3f6-e2c5-1484-71cf-62446cec984d@networkz.ch> <4016890.1676006026@sss.pgh.pa.us>
* 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