BloGroonga

2023-09-12

Groonga 13.0.7 has been released

Groonga 13.0.7 has been released!

How to install: Install

Changes

Here are important changes in this release:

Fixes

  • normalize Fixed a bug that normalize command doesn’t output last offset and type.

    normalize command can output offset and type of string after normalize as below, but normalize command doesn’t output the last offset and type by this bug.

    table_create Normalizations TABLE_PAT_KEY ShortText
    column_create Normalizations normalized COLUMN_SCALAR ShortText
    load --table Normalizations
    [
    {"_key": "あ", "normalized": "<あ>"}
    ]
    
    normalize   'NormalizerNFKC130("unify_kana", true, "report_source_offset", true),    NormalizerTable("normalized", "Normalizations.normalized",                    "report_source_offset", true)'   "お あ a ア i ア オ"   REMOVE_BLANK|WITH_TYPES|WITH_CHECKS
    [
      [
        0,
        0.0,
        0.0
      ],
      {
        "normalized": "お<あ>a<あ>i<あ>お",
        "types": [
          "hiragana",
          "symbol",
          "hiragana",
          "symbol",
          "alpha",
          "symbol",
          "hiragana",
          "symbol",
          "alpha",
          "symbol",
          "hiragana",
          "symbol",
          "hiragana"
        ],
        "checks": [
          3,
          0,
          0,
          4,
          -1,
          0,
          0,
          -1,
          4,
          4,
          -1,
          0,
          0,
          -1,
          4,
          4,
          -1,
          0,
          0,
          -1,
          4,
          0,
          0
        ],
        "offsets": [
          0,
          4,
          4,
          4,
          8,
          12,
          12,
          12,
          16,
          20,
          20,
          20,
          24
        ]
      }
    ]
    
  • Normalizers Fixed a bug that the last offset value may be invalid when we use multiple normalizers.

    For the following example, the last offset value is 27 correctly, but it is 17 in the following example by this bug.

    table_create Normalizations TABLE_PAT_KEY ShortText
    column_create Normalizations normalized COLUMN_SCALAR ShortText
    load --table Normalizations
    [
    {"_key": "あ", "normalized": "<あ>"}
    ]
    
    normalize   'NormalizerNFKC130("unify_kana", true, "report_source_offset", true),    NormalizerTable("normalized", "Normalizations.normalized",                    "report_source_offset", true)'   "お あ a ア i ア オ"   REMOVE_BLANK|WITH_TYPES|WITH_CHECKS
    [
      [
        0,
        0.0,
        0.0
      ],
      {
        "normalized": "お<あ>a<あ>i<あ>お",
        "types": [
          "hiragana",
          "symbol",
          "hiragana",
          "symbol",
          "alpha",
          "symbol",
          "hiragana",
          "symbol",
          "alpha",
          "symbol",
          "hiragana",
          "symbol",
          "hiragana",
          "null"
        ],
        "checks": [
          3,
          0,
          0,
          4,
          -1,
          0,
          0,
          -1,
          4,
          4,
          -1,
          0,
          0,
          -1,
          4,
          4,
          -1,
          0,
          0,
          -1,
          4,
          0,
          0
        ],
        "offsets": [
          0,
          4,
          4,
          4,
          8,
          12,
          12,
          12,
          16,
          20,
          20,
          20,
          24,
          17
        ]
      }
    ]
    

Conclusion

Please refert to the following news for more details.

News Release 13.0.7

Let's search by Groonga!

2023-08-31

Groonga 13.0.6 has been released

Groonga 13.0.6 has been released!

How to install: Install

Changes

Here are important changes in this release:

Improvements

  • highlight_html Don't report error when we specify empty string into highlight_html() as below.

    highlight_html() just returns an empty text.

    table_create Entries TABLE_NO_KEY
    column_create Entries body COLUMN_SCALAR ShortText
    
    table_create Terms TABLE_PAT_KEY ShortText \
      --default_tokenizer 'TokenNgram("report_source_location", true)' \
      --normalizer 'NormalizerNFKC150'
    column_create Terms document_index COLUMN_INDEX|WITH_POSITION Entries body
    
    load --table Entries
    [
    {"body": "ab cd ed gh"}
    ]
    
    select Entries \
      --match_columns body \
      --query 'ab' \
      --output_columns 'highlight_html("", Terms)'
    [
      [
        0,
        0.0,
        0.0
      ],
      [
        [
          [
            1
          ],
          [
            [
              "highlight_html",null
            ]
          ],
          [
            ""
          ]
        ]
      ]
    ]
    
  • Added support aggregator_* for dynamic columns and pseudo columns.

    Pseudo column is a column with _ prefix.(e.g. _id, _nsubrecs, …).

    aggregator_* functions is for aggregating as below.

    • aggregator_sum()

      It returns the sum of specify columns.

    • aggregator_mean()

      It returns the arithmetic mean of specify columns.

    • aggregator_sd()

      It returns the standard deviation or unbiased variance of specify columns.

    These functions is for using with drilldown. For example, we want to get mean of sales every category as below.

    table_create Items TABLE_HASH_KEY ShortText
    column_create Items price COLUMN_SCALAR UInt32
    column_create Items tag COLUMN_SCALAR ShortText
    
    load --table Items
    [
    {"_key": "Book",  "price": 1000, "tag": "A"},
    {"_key": "Note",  "price": 1000, "tag": "B"},
    {"_key": "Box",   "price": 500,  "tag": "B"},
    {"_key": "Pen",   "price": 500,  "tag": "A"},
    {"_key": "Food",  "price": 500,  "tag": "C"},
    {"_key": "Drink", "price": 300,  "tag": "B"}
    ]
    
    select Items \
      --drilldowns[tag].keys tag \
      --drilldowns[tag].output_columns _key,_nsubrecs,price_mean \
      --drilldowns[tag].columns[price_mean].stage group \
      --drilldowns[tag].columns[price_mean].type Float \
      --drilldowns[tag].columns[price_mean].flags COLUMN_SCALAR \
      --drilldowns[tag].columns[price_mean].value 'aggregator_mean(price)'
    [
      [
        0,
        0.0,
        0.0
      ],
      [
        [
          [
            6
          ],
          [
            [
              "_id",
              "UInt32"
            ],
            [
              "_key",
              "ShortText"
            ],
            [
              "price",
              "UInt32"
            ],
            [
              "tag",
              "ShortText"
            ]
          ],
          [
            1,
            "Book",
            1000,
            "A"
          ],
          [
            2,
            "Note",
            1000,
            "B"
          ],
          [
            3,
            "Box",
            500,
            "B"
          ],
          [
            4,
            "Pen",
            500,
            "A"
          ],
          [
            5,
            "Food",
            500,
            "C"
          ],
          [
            6,
            "Drink",
            300,
            "B"
          ]
        ],
        {
          "tag":
          [
            [
              3
            ],
            [
              [
                "_key",
                "ShortText"
              ],
              [
                "_nsubrecs",
                "Int32"
              ],
              [
                "price_mean",
                "Float"
              ]
            ],
            [
              "A",
              2,
              750.0
            ],
            [
              "B",
              3,
              600.0
            ],
            [
              "C",
              1,
              500.0
            ]
          ]
        }
      ]
    ]
    

Fixes

  • highlight_html Fixed a bug that highlight position may be incorrect.

    For example, this bug occures when we specify as highlight target both of keyword with the number of characters is one and keyword with the number of characters is two.

    table_create Entries TABLE_NO_KEY
    column_create Entries body COLUMN_SCALAR ShortText
    
    table_create Terms TABLE_PAT_KEY ShortText \
      --default_tokenizer 'TokenNgram("report_source_location", true)' \
      --normalizer 'NormalizerNFKC150'
    column_create Terms document_index COLUMN_INDEX|WITH_POSITION Entries body
    
    load --table Entries
    [
    {"body": "斉藤の一人"}
    ]
    
    select Entries \
      --match_columns body \
      --query '斉藤 一' \
      --output_columns 'highlight_html(body, Terms)'
    [
      [
        0,
        0.0,
        0.0
      ],
      [
        [
          [
            1
          ],
          [
            [
              "highlight_html",
              null
            ]
          ],
          [
            "<span class=\"keyword\">斉藤</span>の<span class=\"keyword\">一</span>人"
          ]
        ]
      ]
    ]
    

Conclusion

Please refert to the following news for more details.

News Release 13.0.6

Let's search by Groonga!

2023-08-02

Groonga 13.0.5 has been released

Groonga 13.0.5 has been released!

How to install: Install

Changes

Here are important changes in this release:

Fixes

  • Fixed a bug that index creation may be failed.

    Groonga v13.0.2, v13.0.3, and v13.0.4 have this bug. Therefore, If you already have used the above version, we highly recommend that you use Groonga v13.0.5 or later.

  • Near phrase search conditionNear phrase search operator Fixed a bug that Groonga may crash when we specify invalid syntax query.

    For example, Groonga is supported to occures error in the following case. However if Groonga has this bug, Groonga is crashed in the following case. (We want to notice that one too many a close parenthesis in the value of “–query” in the following case.)

    table_create Entries TABLE_NO_KEY
    [[0,0.0,0.0],true]
    column_create Entries content COLUMN_SCALAR Text
    [[0,0.0,0.0],true]
    table_create Terms TABLE_PAT_KEY ShortText   --default_tokenizer TokenNgram   --normalizer NormalizerNFKC121
    [[0,0.0,0.0],true]
    column_create Terms entries_content COLUMN_INDEX|WITH_POSITION Entries content
    [[0,0.0,0.0],true]
    load --table Entries
    [
    {"content": "a b c"}
    ]
    [[0,0.0,0.0],1]
    select Entries   --match_columns content   --query '*NPP2"(a b))"'   --output_columns '_score, content'
    

Conclusion

Please refert to the following news for more details.

News Release 13.0.5

Let's search by Groonga!

2023-05-18

PGroonga (fast full text search module for PostgreSQL) 3.0.3 has been released

PGroonga 3.0.3 has been released! PGroonga makes PostgreSQL fast full text search for all languages.

Fixes

  • Fixed a bug that PGroonga may have crashed when PGroonga writed PGroonga's WAL.

  • GH-336: Fixed a bug that PGroonga crashed if we specify shared_preload_libraries = 'pgroonga' in the PostgreSQL's config file. [Reported by askdkc and Rui Chen]

    PGroonga doesn't crash even if we specify shared_preload_libraries = 'pgroonga' by this modification.

    However, if we specify shared_preload_libraries = 'pgroonga', PGroonga doesn't work well.

    For example, CREATE INDEX USING pgroonga is failed. However, probabry, old PGroonga also has not worked well with shared_preload_libraries = 'pgroonga'.

    Because we don't have a timing that initializes Groonga's DB.

    Therefore, we don't specify shared_preload_libraries = 'pgroonga' in the PostgreSQL's config file.

Thanks

  • askdkc
  • Rui Chen

How to upgrade

If you're using PGroonga 2.0.0 or later, you can upgrade by steps in "Compatible case" in Upgrade document.

If you're using PGroonga 1.Y.Z, you can upgrade by steps in "Incompatible case" in Upgrade document.

Support service

If you need commercial support for PGroonga, contact us.

Conclusion

Try PGroonga when you want to perform fast full text search against all languages on PostgreSQL!

2023-05-11

PGroonga (fast full text search module for PostgreSQL) 3.0.2 has been released

PGroonga 3.0.2 has been released! PGroonga makes PostgreSQL fast full text search for all languages.

Fixes

  • Fixed a bug that PGroonga may crashe when we used pgroonga_query_expand().

    However, probably, this problem rarely occur.

  • Fixed a bug that SELECT using PGroonga's index may fail after PostgreSQL crashed while execution INSERT.

    However, probably, this problem rarely occur.

  • Fixed a bug that many compile errors rised when we did not not define HAVE_MSGPACK in src/pgrn-wal.c.

    This problem only occures when we build PGroonga from sources.

Thanks

  • OBATA Akio

How to upgrade

If you're using PGroonga 2.0.0 or later, you can upgrade by steps in "Compatible case" in Upgrade document.

If you're using PGroonga 1.Y.Z, you can upgrade by steps in "Incompatible case" in Upgrade document.

Support service

If you need commercial support for PGroonga, contact us.

Conclusion

Try PGroonga when you want to perform fast full text search against all languages on PostgreSQL!