PGroonga (fast full text search module for PostgreSQL) 2.4.2 has been released
PGroonga 2.4.2 has been released! PGroonga makes PostgreSQL fast full text search for all languages.
Highlight
Added a new module pgroonga_standby_maintainer
for executing pgroonga_wal_apply()
and pgroonga_vacuum()
automatically on a standby database
The new pgroonga_standby_maintainer
module since 2.4.2. would be highly recommended for users who need to run pgroonga_wal_apply()
and pgroonga_vacuum()
.
Normally PGroonga's WAL doesn't apply on a standby database, when we use PGroonga with streaming replication.
Therefore, for example, a first "SELECT" on a primary database may become slower after we switch from a standby database. Because it takes time to apply PGroonga's WAL to the primary database.
The pgroonga_wal_applier
module could solve this WAL problem and help users until now. However, pgroonga_standby_maintainer module since 2.4.2. is a new solution and more useful than the pgroonga_wal_applier
module.
Because pgroonga_standby_maintainer
does not only automatically execute the pgroonga_vacuum()
function but also automatically execute the pgroonga_wal_apply()
function on a standby database.
Therefore, with the pgroonga_standby_maintainer
module, the pgroonga_wal_applier
module won't be necessary, and it would not be necessary to execute periodically the pgroonga_vacuum()
function on the standby database.
Please refer to a reference of the pgroonga_standby_maintainer
module about how to the pgroonga_standby_maintainer
module.
Added the pgroonga_snippet_html()
function, a new argument specifing snippet length dynamically
The new the pgroonga_snippet_html()
function let us extract around texts of keywords with increased flexibility!
Normally, the max number of around texts of keywords that pgroonga_snippet_html function can extracts is 200 byte. However, we can adjust this number dynamically with this feature.
For example, if we want to extruct 50 byte around texts of keywords, we can extruct them as below with this feature.
Note that We can dynamically specify a length of around texts of keywords with the third argument of the pgroonga_snippet_html()
function.
SELECT pgroonga_snippet_html(
'Groonga is a fast and accurate full text search engine based on ' ||
'inverted index. One of the characteristics of Groonga is that a ' ||
'newly registered document instantly appears in search results. ' ||
'Also, Groonga allows updates without read locks. These characteristics ' ||
'result in superior performance on real-time applications.' ||
E'\n' ||
E'\n' ||
'Groonga is also a column-oriented database management system (DBMS). ' ||
'Compared with well-known row-oriented systems, such as MySQL and ' ||
'PostgreSQL, column-oriented systems are more suited for aggregate ' ||
'queries. Due to this advantage, Groonga can cover weakness of ' ||
'row-oriented systems.',
ARRAY['Groonga'],
50
);
pgroonga_snippet_html
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{"<span class=\"keyword\">Groonga</span> is a fast and accurate full text search en","he characteristics of <span class=\"keyword\">Groonga</span> is that a newly regi","search results. Also, <span class=\"keyword\">Groonga</span> allows updates witho"}
(1 row)
Please refer to a reference of the pgroonga_snippet_html()
function about how to the pgroonga_snippet_html()
function.
Please refer to a release note of PGroonga about the other modifications.
How to upgrade
This version is compatible with before versions. You can upgrade by steps in "Compatible case" in Upgrade document.
Conclusion
If you are new user, see also About PGroonga.
Try PGroonga when you want to perform fast full text search against all languages on PostgreSQL!