Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pgroonga_query_expand: support "text" as synonym column type
- Loading branch information
Showing
7 changed files
with
88 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| CREATE TABLE synonyms ( | ||
| term text PRIMARY KEY, | ||
| synonym int | ||
| ); | ||
| SELECT pgroonga_query_expand('synonyms', 'term', 'synonym', 'PGroonga'); | ||
| ERROR: pgroonga: query_expand: synonyms column isn't text type nor text[] type: <synonyms>.<synonym> | ||
| DROP TABLE synonyms; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| CREATE TABLE synonyms ( | ||
| term text, | ||
| synonym text | ||
| ); | ||
| CREATE INDEX synonyms_term_index ON synonyms (term); | ||
| INSERT INTO synonyms VALUES ('PGroonga', 'PGroonga'); | ||
| INSERT INTO synonyms VALUES ('PGroonga', 'Groonga PostgreSQL'); | ||
| SELECT pgroonga_query_expand('synonyms', 'term', 'synonym', 'PGroonga'); | ||
| pgroonga_query_expand | ||
| -------------------------------------- | ||
| ((Groonga PostgreSQL) OR (PGroonga)) | ||
| (1 row) | ||
|
|
||
| DROP TABLE synonyms; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| CREATE TABLE synonyms ( | ||
| term text PRIMARY KEY, | ||
| synonym int | ||
| ); | ||
|
|
||
| SELECT pgroonga_query_expand('synonyms', 'term', 'synonym', 'PGroonga'); | ||
|
|
||
| DROP TABLE synonyms; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| CREATE TABLE synonyms ( | ||
| term text, | ||
| synonym text | ||
| ); | ||
|
|
||
| CREATE INDEX synonyms_term_index ON synonyms (term); | ||
|
|
||
| INSERT INTO synonyms VALUES ('PGroonga', 'PGroonga'); | ||
| INSERT INTO synonyms VALUES ('PGroonga', 'Groonga PostgreSQL'); | ||
|
|
||
| SELECT pgroonga_query_expand('synonyms', 'term', 'synonym', 'PGroonga'); | ||
|
|
||
| DROP TABLE synonyms; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters