Debian Codegraph @

doc/source/news/16.md

raw symbols SCIP
1 # News - 16 series
2
3 (release-16-0-9)=
4
5 ## Release 16.0.9 - 2026-08-07
6
7 ### Improvements
8
9 #### [benchmark] Remove incorrect `G_GNUC_CONST` usage
10
11 [GH-2857](https://github.com/groonga/groonga/issues/2857) Reported by correctmost.
12
13 [GH-2858](https://github.com/groonga/groonga/pull/2858) Patched by correctmost.
14
15 Changed for compatibility with recent GCC versions.
16 See https://gitlab.gnome.org/GNOME/glib/-/commit/016829559 for details.
17
18 #### [{doc}`/reference/functions/string_truncate`] Added new function `string_truncate()`
19
20 `string_truncate()` truncates a string to at most the specified number of characters.
21 If the string is truncated, the tail of the kept characters is replaced with an omission mark so that the result, including the omission mark, is `length` characters long, in the same way as Ruby on Rails' `String#truncate`.
22
23 Execution example:
24
25 ```
26 plugin_register functions/string
27
28 table_create Memos TABLE_HASH_KEY ShortText
29 load --table Memos
30 [
31 {"_key": "Groonga is a full text search engine"}
32 ]
33
34 select Memos \
35 --output_columns '_key, string_truncate(_key, 15)'
36 # [
37 # [
38 # 0,
39 # 1337566253.89858,
40 # 0.000355720520019531
41 # ],
42 # [
43 # [
44 # [
45 # 1
46 # ],
47 # [
48 # [
49 # "_key",
50 # "ShortText"
51 # ],
52 # [
53 # "string_truncate",
54 # null
55 # ]
56 # ],
57 # [
58 # "Groonga is a full text search engine",
59 # "Groonga is a..."
60 # ]
61 # ]
62 # ]
63 # ]
64 ```
65
66 #### Added new function `binary_length()`
67
68 `binary_length()` returns the size of the data in a column in bytes.
69 You can use it to check the data size of each column as shown below.
70
71 ```
72 plugin_register functions/binary
73
74 table_create Memos TABLE_HASH_KEY ShortText
75
76 load --table Memos
77 [
78 {"_key": "ぐるんが"},
79 {"_key": "Groonga"}
80 ]
81
82 select Memos \
83 --output_columns '_key, binary_length(_key)'
84 #[
85 # [
86 # 0,
87 # 1786079749.354771,
88 # 0.0005497932434082031
89 # ],
90 # [
91 # [
92 # [
93 # 2
94 # ],
95 # [
96 # [
97 # "_key",
98 # "ShortText"
99 # ],
100 # [
101 # "binary_length",
102 # null
103 # ]
104 # ],
105 # [
106 # "ぐるんが",
107 # 12
108 # ],
109 # [
110 # "Groonga",
111 # 7
112 # ]
113 # ]
114 # ]
115 #]
116 ```
117
118 #### [normalizers] Added support for Unicode 17.0.0
119
120 ### Fixes
121
122 #### Fixed a bug where input was unintentionally tokenized while ignoring whitespace when using multiple normalizers
123
124 [GH-2853](https://github.com/groonga/groonga/issues/2853) Reported by askdkc.
125
126 For example, the following text incorrectly matches the query "sayuri" cause of this issue:
127
128 ```
129 nanakusa yurine konnyaku
130 ```
131
132 However, the text does not contain "sayuri".
133
134 This issue occurs only when using multiple normalizers as shown below:
135
136 ```
137 table_create Normalizations TABLE_PAT_KEY ShortText
138 column_create Normalizations normalized COLUMN_SCALAR ShortText
139 load --table Normalizations
140 [
141 {"_key": "Anything", "normalized": "Whatever"}
142 ]
143
144 table_create EntriesChained TABLE_NO_KEY
145 column_create EntriesChained content COLUMN_SCALAR Text
146
147 table_create TermsChained TABLE_PAT_KEY ShortText \
148 --default_tokenizer 'TokenNgram("unify_alphabet", false)' \
149 --normalizers 'NormalizerNFKC150, NormalizerTable("normalized", "Normalizations.normalized")'
150 column_create TermsChained content_index COLUMN_INDEX|WITH_POSITION EntriesChained content
151
152 load --table EntriesChained
153 [
154 {"content": "nanakusa yurine konnyaku"}
155 ]
156
157 select EntriesChained \
158 --match_columns content \
159 --query sayuri \
160 --output_columns _id,content
161 [
162 [
163 0,
164 1783649374.310488,
165 0.0007901191711425781
166 ],
167 [
168 [
169 [
170 1
171 ],
172 [
173 [
174 "_id",
175 "UInt32"
176 ],
177 [
178 "content",
179 "Text"
180 ]
181 ],
182 [
183 1,
184 "nanakusa yurine konnyaku"
185 ]
186 ]
187 ]
188 ]
189 ```
190
191 ### Thanks
192
193 - askdkc
194
195 - correctmost
196
197 (release-16-0-8)=
198
199 ## Release 16.0.8 - 2026-07-13
200
201 ### Improvements
202
203 #### [{doc}`/reference/functions/between`] Added support for vector type value as the 1st parameter
204
205 > Note that `between` does not use an index for a vector value yet.
206
207 In the following example, `between` returns `true` if any of the elements is included in the specified range.
208 Therefore, we can use `between` to search records that have at least one value in the range.
209
210 Execution example:
211
212 ```
213 table_create Products TABLE_HASH_KEY ShortText
214 # [[0,1337566253.89858,0.000355720520019531],true]
215 column_create Products prices COLUMN_VECTOR Int32
216 # [[0,1337566253.89858,0.000355720520019531],true]
217
218 load --table Products
219 [
220 {"_key": "A", "prices": [17, 170, 1700]},
221 {"_key": "B", "prices": [18, 180, 1800]},
222 {"_key": "C", "prices": [19, 190]},
223 {"_key": "D", "prices": [20]},
224 {"_key": "E", "prices": [21, 210, 2100]}
225 ]
226 # [[0,1337566253.89858,0.000355720520019531],5]
227
228 select Products --filter 'between(prices, 18, "include", 20, "exclude")'
229 # [
230 # [
231 # 0,
232 # 1337566253.89858,
233 # 0.000355720520019531
234 # ],
235 # [
236 # [
237 # [
238 # 2
239 # ],
240 # [
241 # [
242 # "_id",
243 # "UInt32"
244 # ],
245 # [
246 # "_key",
247 # "ShortText"
248 # ],
249 # [
250 # "prices",
251 # "Int32"
252 # ]
253 # ],
254 # [
255 # 2,
256 # "B",
257 # [
258 # 18,
259 # 180,
260 # 1800
261 # ]
262 # ],
263 # [
264 # 3,
265 # "C",
266 # [
267 # 19,
268 # 190
269 # ]
270 # ]
271 # ]
272 # ]
273 # ]
274 ```
275
276 #### Dropped support for Debian 12 (bookworm)
277
278 It reached EOL on 2026-06-10.
279
280 ### Fixes
281
282 #### Fixed a crash bug when we specify `language_model_knn(...)` as `sort_keys`
283
284 For example, if you specify `language_model_knn(text, "male child", {"k" : 2 })` as `sort_keys`, Groonga crashes due to a double free that occurs while processing the `{ "k" : 2 }` option in the sort routine.
285
286 #### Fixed a crash bug when we use `language_model_knn()` with empty value
287
288 Groonga crashes when `language_model_knn()` is used with empty value as shown below:
289
290 ```
291 plugin_register language_model/knn
292 [[0,0.0,0.0],true]
293
294 table_create Data TABLE_NO_KEY
295 [[0,0.0,0.0],true]
296 column_create Data text COLUMN_SCALAR ShortText
297 [[0,0.0,0.0],true]
298 column_create Data rabitq_code COLUMN_SCALAR ShortBinary
299 [[0,0.0,0.0],true]
300
301 load --table Data
302 [
303 {"text": "I am a boy."},
304 {"text": ""},
305 {"text": "This is an apple."}
306 ]
307 [[0,0.0,0.0],3]
308
309 table_create RaBitQ TABLE_HASH_KEY ShortBinary \
310 --default_tokenizer 'TokenLanguageModelKNN("model", \
311 "hf:///groonga/all-MiniLM-L6-v2-Q4_K_M-GGUF", \
312 "code_column", "rabitq_code")'
313 [[0,0.0,0.0],true]
314 column_create RaBitQ data_text COLUMN_INDEX Data text
315 [[0,0.0,0.0],true]
316
317 select Data --filter 'language_model_knn(text, "male child")' --output_columns text
318 ```
319
320 ### Experimental features
321
322 > This is an experimental feature. Currently, this feature is still not stable.
323
324 #### [{doc}`/reference/functions/json_extract`] Added support for `json_extract()`
325
326 `json_extract()` extracts values from a JSON by a JSONPath expression.
327 The extracted values keep their JSON types.
328 For example, a string in JSON is extracted as a text and an integer in JSON is extracted as an integer.
329 Therefore, we can use `json_extract()` for both full text search against strings and range search against numbers as shown below:
330
331 ```
332 table_create Data TABLE_NO_KEY
333 # [[0,1337566253.89858,0.000355720520019531],true]
334 column_create Data value COLUMN_SCALAR JSON
335 # [[0,1337566253.89858,0.000355720520019531],true]
336
337 load --table Data
338 [
339 {"value": "{\"value\": [[1, 10], [100]]}"},
340 {"value": "{\"value\": [[2], [20, 200]]}"},
341 {"value": "{\"value\": [[-1, -10], [-100]]}"}
342 ]
343
344 select Data --filter 'between(json_extract(value, "$.value[*][*]"), 10, 20)'
345 # [
346 # [
347 # 0,
348 # 1337566253.89858,
349 # 0.000355720520019531
350 # ],
351 # [
352 # [
353 # [
354 # 2
355 # ],
356 # [
357 # [
358 # "_id",
359 # "UInt32"
360 # ],
361 # [
362 # "value",
363 # "JSON"
364 # ]
365 # ],
366 # [
367 # 1,
368 # {
369 # "value": [
370 # [
371 # 1,
372 # 10
373 # ],
374 # [
375 # 100
376 # ]
377 # ]
378 # }
379 # ],
380 # [
381 # 2,
382 # {
383 # "value": [
384 # [
385 # 2
386 # ],
387 # [
388 # 20,
389 # 200
390 # ]
391 # ]
392 # }
393 # ]
394 # ]
395 # ]
396 # ]
397 ```
398
399 #### [{doc}`/reference/extractors/extractor_json`] Added support for `ExtractorJSON`
400
401 > This is an experimental feature. Currently, this feature is still not stable.
402
403 `ExtractorJSON` extracts values from JSON data by a JSONPath expression as well as `json_extract()`.
404 We can use this extractor to index only the values you need from JSON without indexing the whole JSON text.
405
406 When you attach `ExtractorJSON` to a lexicon, the lexicon indexes the extracted values. The original JSON is kept in the data column.
407
408 The following example indexes integers in a JSON column. The lexicon key type is Int32 because the extracted values are integers.
409 The index is used automatically when the JSON column is loaded, so you can search the original records by the extracted values:
410
411 ```
412 table_create Data TABLE_NO_KEY
413 # [[0,1337566253.89858,0.000355720520019531],true]
414 column_create Data value COLUMN_SCALAR JSON
415 # [[0,1337566253.89858,0.000355720520019531],true]
416 table_create Numbers TABLE_PAT_KEY Int32 \
417 --extractors 'ExtractorJSON("path", "$.value[*][*]")'
418 # [[0,1337566253.89858,0.000355720520019531],true]
419 column_create Numbers data_value COLUMN_INDEX Data value
420 # [[0,1337566253.89858,0.000355720520019531],true]
421 load --table Data
422 [
423 {"value": "{\"value\": [[1, 10], [100]]}"},
424 {"value": "{\"value\": [[2], [20, 200]]}"},
425 {"value": "{\"value\": [[-1, -10], [-100]]}"}
426 ]
427 # [[0,1337566253.89858,0.000355720520019531],3]
428 select Data --filter 'between(Numbers.data_value, 10, 20)'
429 # [
430 # [
431 # 0,
432 # 1337566253.89858,
433 # 0.000355720520019531
434 # ],
435 # [
436 # [
437 # [
438 # 2
439 # ],
440 # [
441 # [
442 # "_id",
443 # "UInt32"
444 # ],
445 # [
446 # "value",
447 # "JSON"
448 # ]
449 # ],
450 # [
451 # 1,
452 # {
453 # "value": [
454 # [
455 # 1,
456 # 10
457 # ],
458 # [
459 # 100
460 # ]
461 # ]
462 # }
463 # ],
464 # [
465 # 2,
466 # {
467 # "value": [
468 # [
469 # 2
470 # ],
471 # [
472 # 20,
473 # 200
474 # ]
475 # ]
476 # }
477 # ]
478 # ]
479 # ]
480 # ]
481 ```
482
483 (release-16-0-5)=
484
485 ## Release 16.0.5 - 2026-05-22
486
487 ### Fixes
488
489 #### Fixed a bug where Groonga for Windows failed to run due to a missing required DLL
490
491 The required DLL (`msvcp140_atomic_wait.dll`) for Groonga for Windows was missing from the `groonga-16.0.2-x64-vs2022-with-vcruntime.zip`.
492
493 This issue only affects Groonga 16.0.2 for Windows.
494
495 (release-16-0-2)=
496
497 ## Release 16.0.2 - 2026-05-07
498
499 ### Improvements
500
501 #### Added support for Ubuntu 26.04 LTS
502
503 ### Fixes
504
505 #### Fixed the ODR(One Definition Rule) violation
506
507 [GH-2787](https://github.com/groonga/groonga/issues/2787) Reported by Nicolas PARLANT.
508
509 The LTO(Link-Time Optimization) build was failing because `grn_tokenizer_query` had two different definitions.
510 This change fixes the ODR violation, allowing the LTO process to complete successfully.
511
512 #### Fixed missing files in benchmark directory of source archive
513
514 [GH-2793](https://github.com/groonga/groonga/issues/2793) Reported by Nicolas PARLANT.
515
516 The missing files are as follows:
517
518 - groonga/benchmark/CMakeLists.txt
519 - groonga/benchmark/bench-distance.c
520 - groonga/benchmark/geo-distance-summary.rb
521
522 #### Fixed a bug where duplicate "tools" directories were created
523
524 [GH-2798](https://github.com/groonga/groonga/pull/2798) Reported by Kentaro Hayashi.
525
526 Fixed an issue where duplicate "tools" directories were created as below when installing the groonga-tools package on AlmaLinux and Amazon Linux:
527
528 ```
529 /usr/share/groonga/tools/tools/
530 ```
531
532 ### Thanks
533
534 - Nicolas PARLANT
535 - Kentaro Hayashi
536
537 (release-16-0-1)=
538
539 ## Release 16.0.1 - 2026-03-30
540
541 ### Improvements
542
543 #### [{doc}`/reference/functions/language_model_vectorize`] Added `prefix` option
544
545 You can now add a prefix to the input text.
546 This is useful for models that require a prefix, similar to the `passage_prefix` and `query_prefix` options of `TokenLanguageModelKNN`.
547
548 ```
549 language_model_vectorize("hf:///groonga/multilingual-e5-base-Q4_K_M-GGUF", \
550 "male child", \
551 {"prefix": "query: "})
552 ```
553
554 #### [{doc}`/reference/commands/object_list`] Added normalizer information to the output
555
556 `object_list` command now includes a `normalizers` field in the output for each table.
557
558 ### Fixes
559
560 #### [HTTP] Fixed a false error for chunked HTTP requests
561
562 Fixed a bug where valid chunked HTTP requests could fail with an error under certain conditions.
563
564 This issue could only occur when a chunked request body was split across multiple receives in a very specific pattern, so most users would never encounter it.
565 If it did occur during a `load` command, the load would only be partially completed and would need to be re-executed.
566
567 No index corruption occurs due to this bug.
568
569 #### Fixed a bug that caused a crash due to using the wrong free function
570
571 Fixed a bug where `grn_obj_unlink()` was used instead of `GRN_OBJ_FIN()` for bulk objects.
572 This could cause a crash in some cases.
573
574 Reported by Daniel Black
575
576 See also: https://jira.mariadb.org/browse/MDEV-39098
577
578 ### Experimental features
579
580 > These features are still experimental and unstable.
581 > We must not use these features in production.
582
583 #### [{doc}`/reference/types`] Added support for arrays and objects in `JSON` type
584
585 The `JSON` type now supports arrays and objects, including nested ones.
586 All JSON value types are now supported.
587
588 #### Added support for OpenZL compression and decompression for scalar columns and Float32 vector columns
589
590 [OpenZL](https://openzl.org/) compression and decompression are now supported for scalar columns and Float32 vector columns.
591 OpenZL can achieve better compression ratios than Zstandard.
592
593 Examples of compression:
594
595 The compression of float32 array results for the following data:
596
597 - The number of array elements is 40,960.
598 - The number of records is 10,000.
599
600 Results:
601
602 - Compress with OpenZL: 1.3GB
603 - Compress with Zstandard: 1.5GB
604 - No compress: 1.6GB
605
606 #### Added extractor support
607
608 Extractors are a new type of module in Groonga that extract plain text from structured data before tokenization.
609
610 The built-in `ExtractorHTML` extractor strips HTML tags and decodes HTML entities from a value, leaving only the text content.
611
612 Here is an example of using `ExtractorHTML` with the `extract` command:
613
614 ```
615 extract \
616 --extractors 'ExtractorHTML' \
617 --value "<html><body>He&lt;ll&gt;o</body></html>"
618 [[0,0.0,0.0],{"extracted":"He<ll>o"}]
619 ```
620
621 ### Thanks
622
623 - Daniel Black
624
625 (release-16-0-0)=
626
627 ## Release 16.0.0 - 2026-02-09
628
629 This is our annual major release! This release doesn't have any
630 backward incompatible changes! So you can upgrade Groonga without
631 migrating your existing databases. You can still use your existing
632 databases as-is.
633
634 ### Fixes
635
636 #### Fixed a bug that causes overflow in the key of `TABLE_DAT_KEY` tables
637
638 If you set a value of 4096 byte against a key, a `TABLE_DAT_KEY` table may be broken.