Skip to content

Commit

Permalink
Run rake to generate translated pages (#395)
Browse files Browse the repository at this point in the history
Some minor fixes are also included.

* Remove unnecessary line breaks and spaces
* Add translations for the index page

The translations under `troubleshooting/` will be changed separately.
  • Loading branch information
abetomo authored Nov 11, 2024
1 parent 43d7000 commit 59633de
Show file tree
Hide file tree
Showing 7 changed files with 241 additions and 10 deletions.
7 changes: 2 additions & 5 deletions _po/ja/development/build-casual.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2024-10-16 12:24+0900\n"
"Last-Translator: Kouhei Sutou <[email protected]>, 2023\n"
"Language-Team: Japanese (https://app.transifex.com/groonga/teams/174082/"
"ja/)\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"PO-Revision-Date: 2024-10-07 16:01+0900\n"

msgid ""
"---\n"
Expand Down
3 changes: 1 addition & 2 deletions _po/ja/development/build.po
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ msgstr ""
"from-a-fork>"

msgid "Here are command lines to clone your fork repository:"
msgstr ""
"フォークしたリポジトリーをクローンするコマンドラインは次のとおりです。\n"
msgstr "フォークしたリポジトリーをクローンするコマンドラインは次のとおりです。"

msgid ""
"```bash\n"
Expand Down
13 changes: 11 additions & 2 deletions _po/ja/index.po
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Language: ja\n"
"PO-Revision-Date: 2024-10-16 12:20+0900\n"
"Last-Translator: Kouhei Sutou <[email protected]>, 2023\n"
"Language-Team: Japanese (https://app.transifex.com/groonga/teams/174082/"
"ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"PO-Revision-Date: 2024-10-07 16:01+0900\n"

msgid ""
"---\n"
Expand Down Expand Up @@ -117,6 +120,12 @@ msgstr ""
" * [リファレンス](reference/): オプションや関数・演算子などの個々の機能の詳"
"細な説明。"

msgid ""
" * [Troubleshooting](troubleshooting/): It describes how to fix troubles."
msgstr ""
" * [トラブルシューティング](troubleshooting/): 期待通りに動かない場合の参考"
"情報。"

msgid " * [Community](community/): It introduces about PGroonga community."
msgstr " * [コミュニティー](community/): PGroongaのコミュニティーの紹介。"

Expand Down
147 changes: 147 additions & 0 deletions _po/ja/troubleshooting/index.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Japanese translations for PACKAGE package.
# Copyright (C) 2024 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-11-11 08:36+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Japanese\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=; plural=;\n"

msgid ""
"---\n"
"title: Troubleshooting\n"
"---\n"
"# Troubleshooting"
msgstr ""

msgid ""
"Many PGroonga search issues stem from improper index setup. This "
"troubleshooting guide addresses these problems."
msgstr ""

msgid ""
"The following sections use a Q&A format to explain these issues in detail."
msgstr ""

msgid "## Q: I created a PGroonga index, but my searches are still slow."
msgstr ""

msgid ""
"A: When a search is slow, it often means PostgreSQL is using a sequential "
"scan instead of the PGroonga index. To check this, run your query with "
"`EXPLAIN ANALYZE`."
msgstr ""

msgid ""
"If you see \"Seq Scan\" in the output, it indicates the system is not "
"utilizing the index. The goal is to see \"Index Scan using "
"pgrn_content_index\" or similar, indicating the index is being used."
msgstr ""

msgid ""
"Check the table configuration to confirm that PGroonga indexes are properly "
"set."
msgstr ""

msgid "<details>"
msgstr ""

msgid ""
"<summary>To confirm whether a sequential search is being executed</summary>"
msgstr ""

msgid "We use a following table structure as an example."
msgstr ""

msgid ""
"To ensure the search is definitely sequential in this example, no indexes or "
"primary keys have been set."
msgstr ""

msgid ""
"```sql\n"
"CREATE TABLE memos (\n"
" title text,\n"
" content text\n"
");"
msgstr ""

msgid ""
"INSERT INTO memos VALUES ('PostgreSQL', 'PostgreSQL is an RDBMS.');\n"
"INSERT INTO memos VALUES ('Groonga', 'Groonga is a super-fast full-text "
"search engine.');\n"
"INSERT INTO memos VALUES ('PGroonga', 'PGroonga is an extension that brings "
"super-fast full-text search to PostgreSQL.');\n"
"```"
msgstr ""

msgid "The query we are examining is as follows:"
msgstr ""

msgid ""
"```sql\n"
"SELECT * FROM memos WHERE content &@~ 'PostgreSQL';\n"
"```"
msgstr ""

msgid "Now, let's confirm whether the query is using a sequential search."
msgstr ""

msgid "As mentioned earlier, we'll use `EXPLAIN ANALYZE` to check."
msgstr ""

msgid ""
"```sql\n"
"EXPLAIN ANALYZE SELECT * FROM memos WHERE content &@~ 'PostgreSQL';\n"
"-- QUERY "
"PLAN \n"
"-- "
"-----------------------------------------------------------------------------------------------------\n"
"-- Seq Scan on memos (cost=0.00..678.80 rows=1 width=64) (actual "
"time=2.803..4.664 rows=2 loops=1)\n"
"-- Filter: (content &@~ 'PostgreSQL'::text)\n"
"-- Rows Removed by Filter: 1\n"
"-- Planning Time: 0.113 ms\n"
"-- Execution Time: 4.731 ms\n"
"-- (5 rows)\n"
"```"
msgstr ""

msgid "The result is as shown above."
msgstr ""

msgid "In the case of a sequential search, \"Seq Scan\" will be displayed."
msgstr ""

msgid ""
"Our goal here is to transform this \"Seq Scan\" into \"Index Scan using "
"#{PGroonga index name}\" as shown below."
msgstr ""

msgid ""
"```sql\n"
"EXPLAIN ANALYZE SELECT * FROM memos WHERE content &@~ 'PostgreSQL';\n"
"-- QUERY "
"PLAN \n"
"-- "
"------------------------------------------------------------------------------------------------------------------------------\n"
"-- Index Scan using pgrn_content_index on memos (cost=0.00..4.02 rows=1 "
"width=64) (actual time=0.778..0.782 rows=2 loops=1)\n"
"-- Index Cond: (content &@~ 'PostgreSQL'::text)\n"
"-- Planning Time: 0.835 ms\n"
"-- Execution Time: 1.002 ms\n"
"-- (4 rows)\n"
"```"
msgstr ""

msgid "</details>"
msgstr ""
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PostgreSQL supports full text search against languages that use only alphabet an
* [How to](how-to/): It describes about useful information for specific situations.

* [Reference](reference/): It describes details for each features such as options, functions and operators.

* [Troubleshooting](troubleshooting/): It describes how to fix troubles.

* [Community](community/): It introduces about PGroonga community.
Expand Down
2 changes: 2 additions & 0 deletions ja/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ PostgreSQLはアルファベットと数値だけを使った言語の全文検

* [リファレンス](reference/): オプションや関数・演算子などの個々の機能の詳細な説明。

* [トラブルシューティング](troubleshooting/): 期待通りに動かない場合の参考情報。

* [コミュニティー](community/): PGroongaのコミュニティーの紹介。

* [ユーザー](users/): PGroongaユーザー。
Expand Down
77 changes: 77 additions & 0 deletions ja/troubleshooting/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Troubleshooting
---
# Troubleshooting

Many PGroonga search issues stem from improper index setup. This troubleshooting guide addresses these problems.

The following sections use a Q&A format to explain these issues in detail.

## Q: I created a PGroonga index, but my searches are still slow.

A: When a search is slow, it often means PostgreSQL is using a sequential scan instead of the PGroonga index. To check this, run your query with `EXPLAIN ANALYZE`.

If you see "Seq Scan" in the output, it indicates the system is not utilizing the index. The goal is to see "Index Scan using pgrn_content_index" or similar, indicating the index is being used.

Check the table configuration to confirm that PGroonga indexes are properly set.

<details>

<summary>To confirm whether a sequential search is being executed</summary>

We use a following table structure as an example.

To ensure the search is definitely sequential in this example, no indexes or primary keys have been set.

```sql
CREATE TABLE memos (
title text,
content text
);

INSERT INTO memos VALUES ('PostgreSQL', 'PostgreSQL is an RDBMS.');
INSERT INTO memos VALUES ('Groonga', 'Groonga is a super-fast full-text search engine.');
INSERT INTO memos VALUES ('PGroonga', 'PGroonga is an extension that brings super-fast full-text search to PostgreSQL.');
```

The query we are examining is as follows:

```sql
SELECT * FROM memos WHERE content &@~ 'PostgreSQL';
```

Now, let's confirm whether the query is using a sequential search.

As mentioned earlier, we'll use `EXPLAIN ANALYZE` to check.

```sql
EXPLAIN ANALYZE SELECT * FROM memos WHERE content &@~ 'PostgreSQL';
-- QUERY PLAN
-- -----------------------------------------------------------------------------------------------------
-- Seq Scan on memos (cost=0.00..678.80 rows=1 width=64) (actual time=2.803..4.664 rows=2 loops=1)
-- Filter: (content &@~ 'PostgreSQL'::text)
-- Rows Removed by Filter: 1
-- Planning Time: 0.113 ms
-- Execution Time: 4.731 ms
-- (5 rows)
```

The result is as shown above.

In the case of a sequential search, "Seq Scan" will be displayed.

Our goal here is to transform this "Seq Scan" into "Index Scan using #{PGroonga index name}" as shown below.

```sql
EXPLAIN ANALYZE SELECT * FROM memos WHERE content &@~ 'PostgreSQL';
-- QUERY PLAN
-- ------------------------------------------------------------------------------------------------------------------------------
-- Index Scan using pgrn_content_index on memos (cost=0.00..4.02 rows=1 width=64) (actual time=0.778..0.782 rows=2 loops=1)
-- Index Cond: (content &@~ 'PostgreSQL'::text)
-- Planning Time: 0.835 ms
-- Execution Time: 1.002 ms
-- (4 rows)
```

</details>

0 comments on commit 59633de

Please sign in to comment.