Skip to content

Sam/pgroonga deps - #1105

Merged
samrose merged 12 commits into
developfrom
sam/pgroonga-deps
Sep 13, 2024
Merged

samrose merged 12 commits into
developfrom
sam/pgroonga-deps

Conversation

@samrose

@samrose samrose commented Aug 9, 2024

Copy link
Copy Markdown
Collaborator

What kind of change does this PR introduce?

a comment on a PR #462 (comment) reported that in our 15.6 release, TokenMecab was no longer working on the pgroonga extension.

This PR restores that Tokenizer capability to the proonga extension, and adds the following test below, which will run on every PR going forward.

-- File: 0005-test_pgroonga_revised.sql

begin;
    -- Plan for 3 tests: extension, table, and index
    select plan(3);
    
    -- Create the PGroonga extension
    create extension if not exists pgroonga;
    
    -- -- Test 1: Check if PGroonga extension exists
    select has_extension('pgroonga', 'The pgroonga extension should exist.');
    
    -- Create the table
    create table notes(
        id integer primary key,
        content text
    );
    
    -- Test 2: Check if the table was created
    SELECT has_table('public', 'notes', 'The notes table should exist.');    
    -- Create the PGroonga index
    CREATE INDEX pgroonga_content_index
            ON notes
         USING pgroonga (content)
          WITH (tokenizer='TokenMecab');
    
    -- -- Test 3: Check if the index was created
    SELECT has_index('public', 'notes', 'pgroonga_content_index', 'The pgroonga_content_index should exist.');
    
    -- -- Cleanup (this won't affect the test results as they've already been checked)
    DROP INDEX IF EXISTS pgroonga_content_index;
    DROP TABLE IF EXISTS notes;
    
    -- Finish the test plan
    select * from finish();
rollback;

@samrose
samrose requested a review from a team as a code owner August 9, 2024 16:17
@samrose
samrose requested a review from pcnc August 9, 2024 16:18
Comment thread nix/ext/pgroonga.nix Outdated
@samrose
samrose marked this pull request as draft August 17, 2024 22:33
@samrose
samrose marked this pull request as ready for review September 12, 2024 13:44
@olirice

olirice commented Sep 12, 2024

Copy link
Copy Markdown
Contributor

@samrose lgtm, feel free to merge once the conflicts are resolved

@samrose
samrose merged commit 5961293 into develop Sep 13, 2024
@samrose
samrose deleted the sam/pgroonga-deps branch September 13, 2024 18:10
damonrand pushed a commit to cepro/postgres that referenced this pull request Jun 15, 2025
* feat: rebasing

* feat: supabase-groonga and mod pgroonga

* feat: resolving conflicts

* feat: merge conflicts

* feat: TokenMecab now working with pgroonga

* chore: rm comment

* chore: no postFixup needed

* test: smoke test of pgroonga with mecab

* fix: additional fixes to the build/install process in ami
groonga plugins dir must be set as env var for TokenMecab to work

* fix: need to tmp refer to this branch for testing

* chore: bump version for actual release + rm wrapper not needed

* pgroonga mecab test (supabase#1156)

* add mecab test

* add mecab test

---------

Co-authored-by: Sam Rose <samuel@supabase.io>
Co-authored-by: Oliver Rice <github@oliverrice.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants