Debian Codegraph @

doc/source/news/12.rst

raw
1 News - 12 series
2 ================
3
4 .. _release-12-1-2:
5
6 Release 12.1.2 - 2023-01-29
7 ---------------------------
8
9 Improvements
10 ^^^^^^^^^^^^
11
12 * [httpd] Updated bundled nginx to 1.23.3.
13
14 .. _release-12-1-1:
15
16 Release 12.1.1 - 2023-01-06
17 ---------------------------
18
19 Improvements
20 ^^^^^^^^^^^^
21
22 * [:doc:`/reference/commands/select`][:ref:`select-drilldowns-label-key-vector-expansions-power-set`] Vector's power set is now able to aggregate with the drilldowns.
23
24 A new option ``key_vector_expansion`` is added to drilldowns.
25 Currently, ``NONE`` or ``POWER_SET`` can be specified for ``key_vector_expansion``.
26
27 Specifying ``POWER_SET`` to ``key_vector_expansion`` allows to aggregate for power set case.
28 This method of aggregation is useful to aggregate total number of individual and combination tag occurrence at once.
29
30 Following example is to see aggregating total number of individual and combination occurrence for following 3 tags,
31 ``Groonga``, ``Mroonga``, and ``PGroonga``.
32
33 Sample case:
34
35 .. code-block::
36
37 table_create PowersetDrilldownMemos TABLE_HASH_KEY ShortText
38 # [[0, 1337566253.89858, 0.000355720520019531], true]
39 column_create PowersetDrilldownMemos tags COLUMN_VECTOR ShortText
40 # [[0, 1337566253.89858, 0.000355720520019531], true]
41 load --table PowersetDrilldownMemos
42 [
43 {"_key": "Groonga is fast!", "tags": ["Groonga"]},
44 {"_key": "Mroonga uses Groonga!", "tags": ["Groonga", "Mroonga"]},
45 {"_key": "PGroonga uses Groonga!", "tags": ["Groonga", "PGroonga"]},
46 {"_key": "Mroonga and PGroonga are Groonga family", "tags": ["Groonga", "Mroonga", "PGroonga"]}
47 ]
48 # [[0, 1337566253.89858, 0.000355720520019531], 4]
49 select PowersetDrilldownMemos \
50 --drilldowns[tags].keys tags \
51 --drilldowns[tags].key_vector_expansion POWER_SET \
52 --drilldowns[tags].columns[power_set].stage initial \
53 --drilldowns[tags].columns[power_set].value _key \
54 --drilldowns[tags].columns[power_set].flags COLUMN_VECTOR \
55 --drilldowns[tags].sort_keys 'power_set' \
56 --drilldowns[tags].output_columns 'power_set, _nsubrecs' \
57 --limit 0
58 # [
59 # [
60 # 0,
61 # 1337566253.89858,
62 # 0.000355720520019531
63 # ],
64 # [
65 # [
66 # [
67 # 4
68 # ],
69 # [
70 # [
71 # "_id",
72 # "UInt32"
73 # ],
74 # [
75 # "_key",
76 # "ShortText"
77 # ],
78 # [
79 # "tags",
80 # "ShortText"
81 # ]
82 # ]
83 # ],
84 # {
85 # "tags": [
86 # [
87 # 7
88 # ],
89 # [
90 # [
91 # "power_set",
92 # "Text"
93 # ],
94 # [
95 # "_nsubrecs",
96 # "Int32"
97 # ]
98 # ],
99 # [
100 # [
101 # "Groonga"
102 # ],
103 # 4
104 # ],
105 # [
106 # [
107 # "Mroonga"
108 # ],
109 # 2
110 # ],
111 # [
112 # [
113 # "PGroonga"
114 # ],
115 # 2
116 # ],
117 # [
118 # [
119 # "Groonga",
120 # "Mroonga"
121 # ],
122 # 2
123 # ],
124 # [
125 # [
126 # "Groonga",
127 # "PGroonga"
128 # ],
129 # 2
130 # ],
131 # [
132 # [
133 # "Mroonga",
134 # "PGroonga"
135 # ],
136 # 1
137 # ],
138 # [
139 # [
140 # "Groonga",
141 # "Mroonga",
142 # "PGroonga"
143 # ],
144 # 1
145 # ]
146 # ]
147 # }
148 # ]
149 # ]
150
151 This result shows following.
152
153 .. csv-table::
154
155 "tag","number of occurrence"
156 "``Groonga``", "4"
157 "``Mroonga``", "2"
158 "``PGroonga``", "2"
159 "``Groonga`` and ``Mroonga``", "2"
160 "``Groonga`` and ``PGroonga``", "2"
161 "``Mroonga`` and ``PGroonga``", "1"
162 "``Groonga`` and ``Mroonga`` and ``PGroonga``", "1"
163
164 This feature is complex. For more information, please refer to :ref:`select-drilldowns-label-key-vector-expansions-power-set`.
165
166 * [:doc:`/reference/commands/select`] Specific element of vector column is now able to be search target.
167
168 It allows specific elements of vector column to be search targets that specifying the specific elements to ``match_columns`` with index number.
169
170 Following is a sample case.
171
172 .. code-block::
173
174 table_create Memos TABLE_NO_KEY
175 column_create Memos contents COLUMN_VECTOR ShortText
176
177 table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram
178 column_create Lexicon memo_index COLUMN_INDEX|WITH_POSITION|WITH_SECTION Memos contents
179 load --table Memos
180 [
181 ["contents"],
182 [["I like Groonga", "Use Groonga with Ruby"]],
183 [["I like Ruby", "Use Groonga"]]
184 ]
185 select Memos \
186 --match_columns "contents[1]" \
187 --query Ruby \
188 --output_columns "contents, _score"
189 # [
190 # [
191 # 0,
192 # 0.0,
193 # 0.0
194 # ],
195 # [
196 # [
197 # [
198 # 1
199 # ],
200 # [
201 # [
202 # "contents",
203 # "ShortText"
204 # ],
205 # [
206 # "_score",
207 # "Int32"
208 # ]
209 # ],
210 # [
211 # [
212 # "I like Groonga",
213 # "Use Groonga with Ruby"
214 # ],
215 # 1
216 # ]
217 # ]
218 # ]
219 # ]
220
221 ``--match_columns "contents[1]"`` specifies only 2nd vector elements of ``contents`` as the search target.
222 In this sample, ``["I like Groonga", "Use Groonga with Ruby"]`` is shown in the results because ``Ruby`` is in 2nd element ``Use Groonga with Ruby``.
223 However, ``["I like Ruby", "Use Groonga"]`` is not shown in results because ``Ruby`` is not in 2nd element ``Use Groonga``.
224
225 * [:doc:`/reference/commands/load`] Added support for ``YYYY-MM-DD`` time format.
226
227 ``YYYY-MM-DD`` is a general time format.
228 Supporting this time format made ``load`` more useful.
229
230 The time of the loaded value is set to ``00:00:00`` on the local time.
231
232 .. code-block::
233
234 plugin_register functions/time
235 # [[0,0.0,0.0],true]
236 table_create Logs TABLE_NO_KEY
237 # [[0,0.0,0.0],true]
238 column_create Logs created_at COLUMN_SCALAR Time
239 # [[0,0.0,0.0],true]
240 column_create Logs created_at_text COLUMN_SCALAR ShortText
241 # [[0,0.0,0.0],true]
242 load --table Logs
243 [
244 {"created_at": "2000-01-01", "created_at_text": "2000-01-01"}
245 ]
246 # [[0,0.0,0.0],1]
247 select Logs --output_columns "time_format_iso8601(created_at), created_at_text"
248 # [
249 # [
250 # 0,
251 # 0.0,
252 # 0.0
253 # ],
254 # [
255 # [
256 # [
257 # 1
258 # ],
259 # [
260 # [
261 # "time_format_iso8601",
262 # null
263 # ],
264 # [
265 # "created_at_text",
266 # "ShortText"
267 # ]
268 # ],
269 # [
270 # "2000-01-01T00:00:00.000000+09:00",
271 # "2000-01-01"
272 # ]
273 # ]
274 # ]
275 # ]
276
277 Fixes
278 ^^^^^
279
280 * [:doc:`/reference/commands/select`] Fix a bug displaying a wrong label in ``drilldown`` results when ``command_version`` is ``3``.
281 [groonga-dev,05005][Reported by Atsushi Shinoda]
282
283 Following is a sample case.
284
285 .. code-block::
286
287 table_create Documents TABLE_NO_KEY
288 column_create Documents tag1 COLUMN_SCALAR ShortText
289 column_create Documents tag2 COLUMN_SCALAR ShortText
290 load --table Documents
291 [
292 {"tag1": "1", "tag2": "2"}
293 ]
294 select Documents --drilldown tag1,tag2 --command_version 3
295 # {
296 # "header": {
297 # "return_code": 0,
298 # "start_time": 1672123380.653039,
299 # "elapsed_time": 0.0005846023559570312
300 # },
301 # "body": {
302 # "n_hits": 1,
303 # "columns": [
304 # {
305 # "name": "_id",
306 # "type": "UInt32"
307 # },
308 # {
309 # "name": "tag1",
310 # "type": "ShortText"
311 # },
312 # {
313 # "name": "tag2",
314 # "type": "ShortText"
315 # }
316 # ],
317 # "records": [
318 # [
319 # 1,
320 # "1",
321 # "2"
322 # ]
323 # ],
324 # "drilldowns": {
325 # "ctor": {
326 # "n_hits": 1,
327 # "columns": [
328 # {
329 # "name": "_key",
330 # "type": "ShortText"
331 # },
332 # {
333 # "name": "_nsubrecs",
334 # "type": "Int32"
335 # }
336 # ],
337 # "records": [
338 # [
339 # "1",
340 # 1
341 # ]
342 # ]
343 # },
344 # "tag2": {
345 # "n_hits": 1,
346 # "columns": [
347 # {
348 # "name": "_key",
349 # "type": "ShortText"
350 # },
351 # {
352 # "name": "_nsubrecs",
353 # "type": "Int32"
354 # }
355 # ],
356 # "records": [
357 # [
358 # "2",
359 # 1
360 # ]
361 # ]
362 # }
363 # }
364 # }
365 # }
366
367 ``ctor``, displaying right after ``drilldowns`` as result of ``select``, should be ``tag1`` in correct case.
368 In this sample, ``ctor`` is shown instead of ``tag1``. However, what kind of value to be shown is unknown.
369
370 * [:doc:`/reference/normalizers/normalizer_table`] Fix a bug for Groonga to crush with specific definition setting in ``NormalizerTable``.
371 [GitHub:pgroonga/pgroonga#279][Reported by i10a]
372
373 Following case as sample.
374
375 .. code-block::
376
377 table_create Normalizations TABLE_PAT_KEY ShortText --normalizer NormalizerNFKC130
378 column_create Normalizations normalized COLUMN_SCALAR ShortText
379 load --table Normalizations
380 [
381 {"_key": "Ⅰ", "normalized": "1"},
382 {"_key": "Ⅱ", "normalized": "2"},
383 {"_key": "Ⅲ", "normalized": "3"}
384 ]
385 normalize 'NormalizerTable("normalized", "Normalizations.normalized")' "ⅡⅡ"
386
387 This bug is reported to occur when condition meet following 1., 2., and 3..
388
389 1. Keys are normalized in the target table.
390
391 In this sample, it meets condition specifying ``--normalizer NormalizerNFKC130`` in ``Normalizations``.
392 Original keys, ``Ⅰ`` , ``Ⅱ`` ,and ``Ⅲ``, are normalized each into ``i``, ``ii``, ``iii`` with ``NormalizerNFKC130``.
393
394 2. Same characters in the normalized key are included in the other normalized key.
395
396 In this sample, it meets condition because normalized key ``iii`` includes the characters ``ii`` and ``i``, same with other normalized keys which are original key ``Ⅱ`` and ``Ⅰ``.
397
398 3. Same characters of 2nd condition are used multiple times.
399
400 In this sample, it meets condition because normalized key ``iiii``, original key ``ⅡⅡ`` with ``NormalizerNFKC130``, is considered as same with normalized key for ``Ⅲ`` and ``Ⅰ`` with ``NormalizerNFKC130``.
401
402 Normalizing ``iiii`` with ``Normalizations`` takes following steps and it meets the condition.
403
404 * First ``iii`` ( applied for ``Ⅲ`` )
405
406 ``ii`` or ``i`` are not used at first because :doc:`/reference/normalizers/normalizer_table` works
407 with the Longest-Common-Prefix search.
408
409 * Last ``i`` ( applied for ``Ⅰ`` )
410
411 Thanks
412 ^^^^^^
413
414 * i10a
415 * Atsushi Shinoda
416
417 .. _release-12-1-0:
418
419 Release 12.1.0 - 2022-11-29
420 ---------------------------
421
422 Improvements
423 ^^^^^^^^^^^^
424
425 * [:doc:`/reference/commands/load`] Added support for slow log output of ``load``.
426
427 This feature is for Groonga's performance tuning.
428 For example, you can use this feature to detect records that are taking time longer than average when ``load`` is slow.
429
430 Slow log output would be enabled with specifying ``GRN SLOWLOG THRESHOLD`` as the Environment variable.
431
432 Here is about specifying ``GRN_SLOW_LOG_THRESHOLD``.
433
434 * ``GRN_SLOW_LOG_THRESHOLD`` requires specifying time in seconds as a threshold. The time of the threshold can shorter than a second with specifying decimal number.
435 * A log with debug level would be output if the processing time takes longer than specified time with ``GRN_SLOW_LOG_THRESHOLD``.
436
437 Setting for log level would be controlled with :option:`log-level <groonga --log-level>` or :doc:`/reference/commands/log_level`.
438
439 What value to specify ``GRN_SLOW_LOG_THRESHOLD`` would depend on its environment and checking purpose.
440 For an example, we can use following setting to check which records are taking longer time for ``load``.
441 For this, we specify the value based on necesarry time per 1 record calculated with total number and time of ``load``.
442
443 Necessary time to process `load` would be checked in :ref:`query-log`.
444
445 .. code-block::
446
447 2022-11-16 16:41:27.139000|000000CE63AFF640|>load --table Memo
448 2022-11-16 16:43:40.841000|000000CE63AFF640|:000133702000000 load(100000): [0][0][100000]
449 2022-11-16 16:43:40.842000|000000CE63AFF640|:000133703000000 send(46)
450 2022-11-16 16:43:40.842000|000000CE63AFF640|<000133703000000 rc=0
451
452 In this example, the time would be as following;
453
454 * Number of records: 100000
455 * Time to process: 2 minutes 13 seconds = 133 seconds ( Based on Time stamp for beginning ``load`` : 16:43:27 and time stamp for end of ``load`` ( ``rc=0`` ): 16:43:40 )
456 * Time to process 1 record: 0.00133 seconds (133 divided with 100000)
457
458 Therefore, we specify ``0.00133`` as a threshold in ``GRN_SLOW_LOG_THRESHOLD`` to check which records are taking longer time for ``load``.
459
460 Note: Enabling slow log may cause following bad effects.
461
462 * Performance degradation
463 * Larger log size
464
465 Thus, the slow log is recommended to be enabled only necessary occasion.
466
467 * [:doc:`/reference/api`] Added new API ``grn_is_reference_count_enable()``.
468
469 This new API would return boolean weather reference count mode is enabled or not.
470
471 * [:doc:`/reference/api`] Added new API ``grn_set_reference_count_enable(bool enable)``.
472
473 This new API would enable or disable reference count mode.
474
475 For secure usage, this API can't switch reference count mode if there are multiple open database.
476
477 * [:doc:`/reference/api`] Added new API ``grn_is_back_trace_enable()``.
478
479 This new API would return boolean weather logging back trace is enabled or not.
480
481 * [:doc:`/reference/api`] Added new API ``grn_set_back_trace_enable(bool enable)``.
482
483 This new API would enable or disable logging back trace.
484
485 In some environments, Groonga crashes when logging back trace,
486 logging back trace should be disabled in such envoronments.
487
488 * [:doc:`/reference/commands/status`] Added new items: ``back_trace`` and ``/reference_count``.
489
490 ``/reference_count`` indicates weather logging back trace is enabled or not as boolean.
491
492 ``back_trace`` indicates weather logging back trace is enabled or not as boolean.
493
494 .. code-block::
495
496 status
497 [
498 [
499 0,
500 1654237168.304533,
501 0.0001480579376220703
502 ],
503 {
504 (omitted)
505 "back_trace": true,
506 "reference_count": false,
507 }
508 ]
509
510 Fixes
511 ^^^^^
512
513 * [:doc:`/reference/commands/select`][:doc:`/reference/columns/vector`] Fixed a bug displaying integer in the results when a weight vector column specifies `WEIGHT FLOAT32`.
514
515 This bug was only appeared in use of a weight vector column without reference type. A reference type weight vector column does not have this bug.
516
517 The bug only affected on the final result display even though internal processes was in floating-point number.
518
519 An example for this bug as follows;
520
521 .. code-block::
522
523 table_create Memos TABLE_HASH_KEY ShortText
524 # [[0,0.0,0.0],true]
525 column_create Memos tags COLUMN_VECTOR|WITH_WEIGHT|WEIGHT_FLOAT32 ShortText
526 # [[0,0.0,0.0],true]
527 load --table Memos
528 [
529 {
530 "_key": "Groonga is fast",
531 "tags": {
532 "groonga": 2.8,
533 "full text search": 1.2
534 }
535 }
536 ]
537 # [[0,0.0,0.0],1]
538 select Memos
539 # [
540 # [
541 # 0,
542 # 0.0,
543 # 0.0
544 # ],
545 # [
546 # [
547 # [
548 # 1
549 # ],
550 # [
551 # [
552 # "_id",
553 # "UInt32"
554 # ],
555 # [
556 # "_key",
557 # "ShortText"
558 # ],
559 # [
560 # "tags",
561 # "ShortText"
562 # ]
563 # ],
564 # [
565 # 1,
566 # "Groonga is fast",
567 # {
568 # "groonga": 2,
569 # "full text search": 1
570 # }
571 # ]
572 # ]
573 # ]
574 # ]
575
576 ``tags`` column is a ``ShortText`` type weight vector column, sample of non-reference type weight vector column.
577
578 The results in this sample, the value 2 and 1 are returned as below, evne though the correct value should be 2.8 and 1.2.
579
580 .. code-block::
581
582 {
583 "groonga": 2,
584 "full text search": 1
585 }
586
587 Applying this fix, the results would be returned as follows;
588
589 .. code-block::
590
591 select Memos
592 # [
593 # [
594 # 0,
595 # 0.0,
596 # 0.0
597 # ],
598 # [
599 # [
600 # [
601 # 1
602 # ],
603 # [
604 # [
605 # "_id",
606 # "UInt32"
607 # ],
608 # [
609 # "_key",
610 # "ShortText"
611 # ],
612 # [
613 # "tags",
614 # "ShortText"
615 # ]
616 # ],
617 # [
618 # 1,
619 # "Groonga is fast",
620 # {
621 # "groonga": 2.8,
622 # "full text search": 1.2
623 # }
624 # ]
625 # ]
626 # ]
627 # ]
628
629 .. _release-12-0-9:
630
631 Release 12.0.9 - 2022-10-28
632 ---------------------------
633
634 Improvements
635 ^^^^^^^^^^^^
636
637 * [:doc:`/install/almalinux`] Added support for AlmaLinux 9.
638
639 We had added this support at :ref:`release-12-0-8` but haven't announced it.
640
641 * [:doc:`/reference/functions/escalate`] Added a document for the ``escalate()`` function.
642
643 * [:doc:`/reference/normalizers`] Added ``NormalizerHTML``. (Experimental)
644
645 ``NormalizerHTML`` is a normalizer for HTML.
646
647 Currently ``NormalizerHTML`` supports removing tags like ``<span>`` or ``</span>`` and expanding character references like ``&amp;`` or ``&#38;``.
648
649 Here are sample queries for ``NormalizerHTML``.
650
651 .. code-block::
652
653 normalize NormalizerHTML "<span> Groonga &amp; Mroonga &#38; Rroonga </span>"
654 [[0,1666923364.883798,0.0005481243133544922],{"normalized":" Groonga & Mroonga & Rroonga ","types":[],"checks":[]}]
655
656 In this sample ``<span>`` and ``</span>`` are removed, and ``&amp;`` and ``&#38;`` are expanded to ``&``.
657
658 We can specify whether removing the tags with the ``remove_tag`` option.
659 (The default value of the ``remove_tag`` option is ``true``.)
660
661 .. code-block::
662
663 normalize 'NormalizerHTML("remove_tag", false)' "<span> Groonga &amp; Mroonga &#38; Rroonga </span>"
664 [[0,1666924069.278549,0.0001978874206542969],{"normalized":"<span> Groonga & Mroonga & Rroonga </span>","types":[],"checks":[]}]
665
666 In this sample, ``<span>`` and ``</span>`` are not removed.
667
668 We can specify whether expanding the character references with the ``expand_character_reference`` option.
669 (The default value of the ``expand_character_reference`` option is ``true``.)
670
671 .. code-block::
672
673 normalize 'NormalizerHTML("expand_character_reference", false)' "<span> Groonga &amp; Mroonga &#38; Rroonga </span>"
674 [[0,1666924357.099782,0.0002346038818359375],{"normalized":" Groonga &amp; Mroonga &#38; Rroonga ","types":[],"checks":[]}]
675
676 In this sample, ``&amp;`` and ``&#38;`` are not expanded.
677
678 * [httpd] Updated bundled nginx to 1.23.2.
679
680 Contains security fixes of CVE-2022-41741 and CVE-2022-41742.
681 Please refer to https://nginx.org/en/CHANGES about these security fixes.
682
683 * Suppressed logging a lot of same messages when no memory is available.
684
685 Groonga could log a lot of ``mmap failed!!!!`` when no memory is available.
686 We improved to log the above message as less duplicates as possible.
687
688 Fixes
689 ^^^^^
690
691 * [:doc:`/reference/commands/select`] Fixed a bug that Groonga could crash or return incorrect results when specifying :ref:`select-n-workers`.
692
693 This bug had occurred when using :ref:`select-n-workers` with a value greater than ``1`` and ``drilldowns[{LABEL}].filter`` at the same time.
694
695 The reason why this bug occurred was because Groonga referenced incorrect values (objects) when performing internal parallel processing.
696 So if the condition above was satisfied, Groonga sometimes crashed or returned incorrect results depending on the timing of the parallel processing.
697
698 .. _release-12-0-8:
699
700 Release 12.0.8 - 2022-10-03
701 ---------------------------
702
703 Improvements
704 ^^^^^^^^^^^^
705
706 * Changed specification of the ``escalate()`` function (Experimental) to make it easier to use.
707
708 We changed to not use results out of ``escalate()``.
709
710 In the previous specification, users had to guess how many results would be passed to ``escalate()`` to determine the first threshold, which was incovenient.
711
712 Here is a example for the previous ``escalate()``.
713
714 .. code-block::
715
716 number_column > 10 && escalate(THRESHOLD_1, CONDITION_1,
717 ...,
718 THRESHOLD_N, CONDITION_N)
719
720 ``CONDITION1`` was executed when the results of ``number_column > 10`` was less or equal to ``THRESHOLD_1`` .
721 Users had to guess how many results would they get from ``number_column > 10`` to determine ``THRESHOLD_1``.
722
723 From this release, the users don't need to guess how many results will they get from ``number_column > 10``, making it easier to set the thresholds.
724
725 With this change, the syntax of ``escalate()`` changed as follow.
726
727 The previous syntax
728
729 .. code-block::
730
731 escalate(THRESHOLD_1, CONDITION_1,THRESHOLD_2, CONDITION_2, ..., THRESHOLD_N, CONDITION_N)
732
733 The new syntax
734
735 .. code-block::
736
737 escalate(CONDITION_1, THRESHOLD_2, CONDITION_2, ..., THRESHOLD_N, CONDITION_N)
738
739
740 Here are details of the syntax changes.
741
742 * Don't require the threshold for the first condition.
743 * Don't allow empty arguments call. The first condition is required.
744 * Always execute the first condition.
745
746 This function is experimental. These behaviors may be changed in the future.
747
748 * [:doc:`/install/cmake`] Added a document about how to build Groonga with CMake.
749
750 * [:doc:`/install/others`] Added descriptions about how to enable/disable Apache Arrow support when building with GNU Autotools.
751
752 * [:doc:`/reference/commands/select`] Added a document about :ref:`select-drilldowns-label-table`.
753
754 * [:doc:`/contribution/documentation/i18n`] Updated the translation procedure.
755
756 Fixes
757 ^^^^^
758
759 * Fixed a bug that Groonga could return incorrect results when we use :doc:`/reference/normalizers/normalizer_table`
760 and it contains a non-idempotent (results can be changed when executed repeatedly) definition.
761
762 This was caused by that we normalized a search value multiple times: after the value was input and after the value was tokenized.
763
764 Groonga tokenizes and normalizes the data to be registered using the tokenizer and normalizer set in the index table when adding a record.
765 The search value is also tokenized and normalized using the tokenizer and normalizer set in the index table, and then the search value and the index are matched.
766 If the search value is the same as the data registered in the index, it will be in the same state as stored in the index because both use the same tokenizer and normalizer.
767
768 However, Groonga had normalized extra only search keywords.
769
770 Built-in normalizers like :doc:`/reference/normalizers/normalizer_auto` did't cause this bug because
771 they are idempotent (results aren't changed if they are executed repeatedly).
772 On the other hand, :doc:`/reference/normalizers/normalizer_table` allows the users specify their own normalization definitions,
773 so they can specify non-idempotent (results can be changed when executed repeatedly) definitions.
774
775 If there were non-idempotent definitions in :doc:`/reference/normalizers/normalizer_table`,
776 the indexed data and the search value did not match in some cases because the search value was normalized extra.
777
778 In such cases, the data that should hit was not hit or the data that should not hit was hit.
779
780 Here is a example.
781
782 .. code-block::
783
784 table_create ColumnNormalizations TABLE_NO_KEY
785 column_create ColumnNormalizations target_column COLUMN_SCALAR ShortText
786 column_create ColumnNormalizations normalized COLUMN_SCALAR ShortText
787
788 load --table ColumnNormalizations
789 [
790 {"target_column": "a", "normalized": "b"},
791 {"target_column": "b", "normalized": "c"}
792 ]
793
794 table_create Targets TABLE_PAT_KEY ShortText
795 column_create Targets column_normalizations_target_column COLUMN_INDEX \
796 ColumnNormalizations target_column
797
798 table_create Memos TABLE_NO_KEY
799 column_create Memos content COLUMN_SCALAR ShortText
800
801 load --table Memos
802 [
803 {"content":"a"},
804 {"content":"c"},
805 ]
806
807 table_create \
808 Terms \
809 TABLE_PAT_KEY \
810 ShortText \
811 --default_tokenizer 'TokenNgram' \
812 --normalizers 'NormalizerTable("normalized", \
813 "ColumnNormalizations.normalized", \
814 "target", \
815 "target_column")'
816
817 column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content
818
819 select Memos --query content:@a
820 [[0,1664781132.892326,0.03527212142944336],[[[1],[["_id","UInt32"],["content","ShortText"]],[2,"c"]]]]
821
822 The expected result of ``select Memos --query content:@a`` is ``a``, but Groonga returned ``c`` as a result.
823 This was because we normalized the input ``a`` to ``b`` by definitions of ``ColumnNormalizations``, and after that, we normalized the normalized ``b``
824 again and it was normalized to ``c``. As a result, the input ``a`` was converted to ``c`` and matched to ``{"content":"c"}`` of the ``Memos`` table.
825
826 .. _release-12-0-7:
827
828 Release 12.0.7 - 2022-08-29
829 ---------------------------
830
831 Improvements
832 ^^^^^^^^^^^^
833
834 * Added a new function ``escalate()``. (experimental)
835
836 The ``escalate()`` function is similar to the existing match escalation ( :doc:`/spec/search` ).
837 We can use this function for any conditions. (The existing match escalation is just for one full text search by invert index.)
838
839 The ``escalate()`` function is useful when we want to limit the number of results of a search.
840 Even if we use ``--limit``, we can limit the number of results of a search. However, ``--limit`` is evaluated after evaluating all conditions in our query.
841 The ``escalate()`` function finish the evaluation of conditions at that point when the result set has greater than ``THRESHOLD`` records. In other words, The ``escalate()`` function may reduce the number of evaluating conditions.
842
843 The syntax of the ``escalate()`` function as below::
844
845 escalate(THRESHOLD_1, CONDITION_1,
846 THRESHOLD_2, CONDITION_2,
847 ...,
848 THRESHOLD_N, CONDITION_N)
849
850 ``THRESHOLD_N`` is a positive number such as 0 and 29.
851 ``CONDITION_N`` is a string that uses :doc:`/reference/grn_expr/script_syntax` such as ``number_column > 29``.
852
853 If the current result set has less than or equal to ``THRESHOLD_1`` records, the corresponding ``CONDITION_1`` is executed.
854 Similarly, if the next result set has less than or equal to ``THRESHOLD_2`` records, the corresponding ``CONDITION_2`` is executed.
855 If the next result set has greater than ``THRESHOLD_3`` records, the ``escalate()`` function is finished.
856
857 If all ``CONDITION`` s are executed, ``escalate(THRESHOLD_1, CONDITION_1, ..., THRESHOLD_N, CONDITION_N)`` is same as ``CONDITION_1 || ... || CONDITION_N``.
858
859 The ``escalate()`` function can be worked with logical operators such as ``&&`` and ``&!`` ::
860
861 number_column > 10 && escalate(THRESHOLD_1, CONDITION_1,
862 ...,
863 THRESHOLD_N, CONDITION_N)
864 number_column > 10 &! escalate(THRESHOLD_1, CONDITION_1,
865 ...,
866 THRESHOLD_N, CONDITION_N)
867
868 They are same as ``number_column > 10 && (CONDITION_1 || ... || CONDITION_N)`` and ``number_column > 10 &! (CONDITION_1 || ... || CONDITION_N)`` .
869
870 However, these behaviors may be changed because they may not be useful.
871
872 * [httpd] Updated bundled nginx to 1.23.1.
873
874 * [:doc:`/reference/commands/select`] Add a document for the ``--n_workers`` option.
875
876 Fixes
877 ^^^^^
878
879 * Fixed a bug Groonga's response may be slow when we execute the ``request_cancel`` while executing a OR search.
880
881 When the number of results of the OR search is many and a query has many OR conditions, Groonga may response slow with the "request_cancel" command.
882
883 .. _release-12-0-6:
884
885 Release 12.0.6 - 2022-08-04
886 ---------------------------
887
888 Improvements
889 ^^^^^^^^^^^^
890
891 * Added new Munin plugins for groonga-delta.
892
893 We can monitoring the following items by plugins for groonga-delta.
894
895 * Whether ``groonga-delta-import`` can import or not ``.grn`` file on local storage.
896 * Whether ``groonga-delta-import`` can import or not difference data of MySQL.
897 * Whether ``groonga-delta-apply`` can apply imported data or not.
898 * The total size of applying data.
899
900 * [:doc:`/reference/commands/column_copy`] Added support for weight vector.
901
902 We can copy the value of weight vector by ``column_copy`` as below.
903
904 .. code-block::
905
906 table_create Tags TABLE_HASH_KEY ShortText
907 [[0,0.0,0.0],true]
908 table_create CopyFloat32Value TABLE_HASH_KEY ShortText
909 [[0,0.0,0.0],true]
910 column_create CopyFloat32Value source_tags COLUMN_VECTOR|WITH_WEIGHT|WEIGHT_FLOAT32 Tags
911 [[0,0.0,0.0],true]
912 column_create CopyFloat32Value destination_tags COLUMN_VECTOR|WITH_WEIGHT|WEIGHT_FLOAT32 Tags
913 [[0,0.0,0.0],true]
914 load --table CopyFloat32Value
915 [
916 {
917 "_key": "Groonga is fast!!!",
918 "source_tags": {
919 "Groonga": 2.8,
920 "full text search": 1.5
921 }
922 }
923 ]
924 [[0,0.0,0.0],1]
925 column_copy CopyFloat32Value source_tags CopyFloat32Value destination_tags
926 [[0,0.0,0.0],true]
927 select CopyFloat32Value
928 [
929 [
930 0,
931 0.0,
932 0.0
933 ],
934 [
935 [
936 [
937 1
938 ],
939 [
940 [
941 "_id",
942 "UInt32"
943 ],
944 [
945 "_key",
946 "ShortText"
947 ],
948 [
949 "destination_tags",
950 "Tags"
951 ],
952 [
953 "source_tags",
954 "Tags"
955 ]
956 ],
957 [
958 1,
959 "Groonga is fast!!!",
960 {
961 "Groonga": 2.8,
962 "full text search": 1.5
963 },
964 {
965 "Groonga": 2.8,
966 "full text search": 1.5
967 }
968 ]
969 ]
970 ]
971 ]
972
973 * [:doc:`/install/ubuntu`] Dropped support for Ubuntu 21.10 (Impish Indri).
974
975 Because Ubuntu 21.10 reached EOL in July 2022.
976
977 * [:doc:`/install/debian`] Dropped Debian 10 (buster) support.
978
979 Because Debian 10 reaches EOL in August 2022.
980
981 Fixes
982 ^^^^^
983
984 * Fixed a bug that Groonga may crash when we execute drilldown in a parallel by ``n_workers`` option.
985
986 * [:doc:`/reference/commands/select`] Fixed a bug that the syntax error occurred when we specify a very long expression in ``--filter``.
987
988 Because the max stack size for the expression of ``--filter`` was 100 until now.
989
990 .. _release-12-0-5:
991
992 Release 12.0.5 - 2022-06-29
993 ---------------------------
994
995 Improvements
996 ^^^^^^^^^^^^
997
998 * [:doc:`/reference/commands/select`] Improved a little bit of performance for prefix search by search escalation.
999
1000 * [:doc:`/reference/commands/select`] Added support for specifying a reference vector column with weight in ``drilldowns[LABEL]._key``. [GitHub#1366][Patched by naoa]
1001
1002 If we specified a reference vector column with weight in drilldown's key, Groonga had returned incorrect results until now.
1003
1004 For example, the following tag search had returned incorrect results until now.
1005
1006 .. code-block::
1007
1008 table_create Tags TABLE_PAT_KEY ShortText
1009
1010 table_create Memos TABLE_HASH_KEY ShortText
1011 column_create Memos tags COLUMN_VECTOR|WITH_WEIGHT Tags
1012 column_create Memos date COLUMN_SCALAR Time
1013
1014 load --table Memos
1015 [
1016 {"_key": "Groonga is fast!", "tags": {"full-text-search": 100}, "date": "2014-11-16 00:00:00"},
1017 {"_key": "Mroonga is fast!", "tags": {"mysql": 100, "full-text-search": 80}, "date": "2014-11-16 00:00:00"},
1018 {"_key": "Groonga sticker!", "tags": {"full-text-search": 100, "sticker": 10}, "date": "2014-11-16 00:00:00"},
1019 {"_key": "Rroonga is fast!", "tags": {"full-text-search": 100, "ruby": 20}, "date": "2014-11-17 00:00:00"},
1020 {"_key": "Groonga is good!", "tags": {"full-text-search": 100}, "date": "2014-11-17 00:00:00"}
1021 ]
1022
1023 select Memos \
1024 --drilldowns[tags].keys tags \
1025 --drilldowns[tags].output_columns _key,_nsubrecs
1026 [
1027 [
1028 0,
1029 1656480220.591901,
1030 0.0005342960357666016
1031 ],
1032 [
1033 [
1034 [
1035 5
1036 ],
1037 [
1038 [
1039 "_id",
1040 "UInt32"
1041 ],
1042 [
1043 "_key",
1044 "ShortText"
1045 ],
1046 [
1047 "date",
1048 "Time"
1049 ],
1050 [
1051 "tags",
1052 "Tags"
1053 ]
1054 ],
1055 [
1056 1,
1057 "Groonga is fast!",
1058 1416063600.0,
1059 {"full-text-search":100}
1060 ],
1061 [
1062 2,
1063 "Mroonga is fast!",
1064 1416063600.0,
1065 {"mysql":100,"full-text-search":80}
1066 ],
1067 [
1068 3,
1069 "Groonga sticker!",
1070 1416063600.0,
1071 {"full-text-search":100,"sticker":10}
1072 ],
1073 [
1074 4,
1075 "Rroonga is fast!",
1076 1416150000.0,
1077 {"full-text-search":100,"ruby":20}
1078 ],
1079 [
1080 5,
1081 "Groonga is good!",
1082 1416150000.0,
1083 {"full-text-search":100}
1084 ]
1085 ],
1086 {
1087 "tags": [
1088 [
1089 8
1090 ],
1091 [
1092 [
1093 "_key",
1094 "ShortText"
1095 ],
1096 [
1097 "_nsubrecs",
1098 "Int32"
1099 ]
1100 ],
1101 [
1102 "full-text-search",
1103 5
1104 ],
1105 [
1106 "f",
1107 5
1108 ],
1109 [
1110 "mysql",
1111 1
1112 ],
1113 [
1114 "f",
1115 1
1116 ],
1117 [
1118 "sticker",
1119 1
1120 ],
1121 [
1122 "f",
1123 1
1124 ],
1125 [
1126 "ruby",
1127 1
1128 ],
1129 [
1130 "f",
1131 1
1132 ]
1133 ]
1134 }
1135 ]
1136
1137 The above query returns correct results as below since this release.
1138
1139 .. code-block::
1140
1141 select Memos --drilldowns[tags].keys tags --drilldowns[tags].output_columns _key,_nsubrecs
1142 [
1143 [
1144 0,
1145 0.0,
1146 0.0
1147 ],
1148 [
1149 [
1150 [
1151 5
1152 ],
1153 [
1154 [
1155 "_id",
1156 "UInt32"
1157 ],
1158 [
1159 "_key",
1160 "ShortText"
1161 ],
1162 [
1163 "date",
1164 "Time"
1165 ],
1166 [
1167 "tags",
1168 "Tags"
1169 ]
1170 ],
1171 [
1172 1,
1173 "Groonga is fast!",
1174 1416063600.0,
1175 {
1176 "full-text-search": 100
1177 }
1178 ],
1179 [
1180 2,
1181 "Mroonga is fast!",
1182 1416063600.0,
1183 {
1184 "mysql": 100,
1185 "full-text-search": 80
1186 }
1187 ],
1188 [
1189 3,
1190 "Groonga sticker!",
1191 1416063600.0,
1192 {
1193 "full-text-search": 100,
1194 "sticker": 10
1195 }
1196 ],
1197 [
1198 4,
1199 "Rroonga is fast!",
1200 1416150000.0,
1201 {
1202 "full-text-search": 100,
1203 "ruby": 20
1204 }
1205 ],
1206 [
1207 5,
1208 "Groonga is good!",
1209 1416150000.0,
1210 {
1211 "full-text-search": 100
1212 }
1213 ]
1214 ],
1215 {
1216 "tags": [
1217 [
1218 4
1219 ],
1220 [
1221 [
1222 "_key",
1223 "ShortText"
1224 ],
1225 [
1226 "_nsubrecs",
1227 "Int32"
1228 ]
1229 ],
1230 [
1231 "full-text-search",
1232 5
1233 ],
1234 [
1235 "mysql",
1236 1
1237 ],
1238 [
1239 "sticker",
1240 1
1241 ],
1242 [
1243 "ruby",
1244 1
1245 ]
1246 ]
1247 }
1248 ]
1249 ]
1250
1251 * [:doc:`/reference/commands/select`] Added support for doing drilldown with a reference vector with weight even if we use ``query`` or ``filter``, or ``post_filter``. [GitHub#1367][Patched by naoa]
1252
1253 If we specified a reference vector column with weight in drilldown's key when we use ``query`` or ``filter``, or ``post_filter``, Groonga had returned incorrect results or errors until now.
1254
1255 For example, the following query had been erred until now.
1256
1257 .. code-block::
1258
1259 table_create Tags TABLE_PAT_KEY ShortText
1260
1261 table_create Memos TABLE_HASH_KEY ShortText
1262 column_create Memos tags COLUMN_VECTOR|WITH_WEIGHT Tags
1263 column_create Memos date COLUMN_SCALAR Time
1264
1265 load --table Memos
1266 [
1267 {"_key": "Groonga is fast!", "tags": {"full-text-search": 100}, "date": "2014-11-16 00:00:00"},
1268 {"_key": "Mroonga is fast!", "tags": {"mysql": 100, "full-text-search": 80}, "date": "2014-11-16 00:00:00"},
1269 {"_key": "Groonga sticker!", "tags": {"full-text-search": 100, "sticker": 10}, "date": "2014-11-16 00:00:00"},
1270 {"_key": "Rroonga is fast!", "tags": {"full-text-search": 100, "ruby": 20}, "date": "2014-11-17 00:00:00"},
1271 {"_key": "Groonga is good!", "tags": {"full-text-search": 100}, "date": "2014-11-17 00:00:00"}
1272 ]
1273
1274 select Memos \
1275 --filter true \
1276 --post_filter true \
1277 --drilldowns[tags].keys tags \
1278 --drilldowns[tags].output_columns _key,_nsubrecs
1279 [
1280 [
1281 -22,
1282 1656473820.734894,
1283 0.03771400451660156,
1284 "[hash][add][ ] key size unmatch",
1285 [
1286 [
1287 "grn_hash_add",
1288 "hash.c",
1289 3405
1290 ]
1291 ]
1292 ],
1293 [
1294 [
1295 ]
1296 ]
1297 ]
1298
1299 The above query returns correct results as below since this release.
1300
1301 .. code-block::
1302
1303 select Memos \
1304 --filter true \
1305 --post_filter true \
1306 --drilldowns[tags].keys tags \
1307 --drilldowns[tags].output_columns _key,_nsubrecs
1308 [
1309 [
1310 0,
1311 0.0,
1312 0.0
1313 ],
1314 [
1315 [
1316 [
1317 5
1318 ],
1319 [
1320 [
1321 "_id",
1322 "UInt32"
1323 ],
1324 [
1325 "_key",
1326 "ShortText"
1327 ],
1328 [
1329 "date",
1330 "Time"
1331 ],
1332 [
1333 "tags",
1334 "Tags"
1335 ]
1336 ],
1337 [
1338 1,
1339 "Groonga is fast!",
1340 1416063600.0,
1341 {
1342 "full-text-search": 100
1343 }
1344 ],
1345 [
1346 2,
1347 "Mroonga is fast!",
1348 1416063600.0,
1349 {
1350 "mysql": 100,
1351 "full-text-search": 80
1352 }
1353 ],
1354 [
1355 3,
1356 "Groonga sticker!",
1357 1416063600.0,
1358 {
1359 "full-text-search": 100,
1360 "sticker": 10
1361 }
1362 ],
1363 [
1364 4,
1365 "Rroonga is fast!",
1366 1416150000.0,
1367 {
1368 "full-text-search": 100,
1369 "ruby": 20
1370 }
1371 ],
1372 [
1373 5,
1374 "Groonga is good!",
1375 1416150000.0,
1376 {
1377 "full-text-search": 100
1378 }
1379 ]
1380 ],
1381 {
1382 "tags": [
1383 [
1384 4
1385 ],
1386 [
1387 [
1388 "_key",
1389 "ShortText"
1390 ],
1391 [
1392 "_nsubrecs",
1393 "Int32"
1394 ]
1395 ],
1396 [
1397 "full-text-search",
1398 5
1399 ],
1400 [
1401 "mysql",
1402 1
1403 ],
1404 [
1405 "sticker",
1406 1
1407 ],
1408 [
1409 "ruby",
1410 1
1411 ]
1412 ]
1413 }
1414 ]
1415 ]
1416
1417 Known Issues
1418 ^^^^^^^^^^^^
1419
1420 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
1421
1422 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
1423 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
1424
1425 * ``'content @ "Groonga" *< content @ "Mroonga"'``
1426
1427 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
1428
1429 Thanks
1430 ^^^^^^
1431
1432 * naoa
1433
1434 .. _release-12-0-4:
1435
1436 Release 12.0.4 - 2022-06-06
1437 ---------------------------
1438
1439 Improvements
1440 ^^^^^^^^^^^^
1441
1442 * [:doc:`/install/ubuntu`] Added support for Ubuntu 22.04 (Jammy Jellyfish).
1443
1444 * We don't provide `groonga-benchmark`.
1445
1446 Because nobody will not use it and we can't maintain it.
1447
1448 * [:doc:`/reference/commands/status`] Added a new item ``memory_map_size``.
1449
1450 We can get the total memory map size in bytes of Groonga with ``status`` command.
1451
1452 .. code-block::
1453
1454 status
1455 [
1456 [
1457 0,
1458 1654237168.304533,
1459 0.0001480579376220703
1460 ],
1461 {
1462 (omitted)
1463 "memory_map_size": 70098944
1464 }
1465 ]
1466
1467 For example, in Windows, if Groonga uses up physical memory and swap area, Groonga can't more mapping memory than that.
1468 Therefore, we can control properly memory map size by monitoring this value even if the environment does have not enough memory.
1469
1470 Fixes
1471 ^^^^^
1472
1473 * Fixed a bug Groonga's response may be slow when we execute ``request_cancel`` while executing a search.
1474
1475 Especially, when the number of records of the search target is many, Groonga's response may be very slow.
1476
1477 * Fixed a bug that string list can't be casted to int32 vector.
1478
1479 For example, the following cast had failed.
1480
1481 * ["10", "100"] -> [10, 100]
1482
1483 This bug only occurs when we specify ``apache-arrow`` into ``input_type`` as the argument of ``load``.
1484 This bug occurs in Groonga 12.0.2 or later.
1485
1486 * Fixed a bug that Groonga Munin Plugins do not work on AlmaLinux 8 and CentOS 7.
1487
1488 .. _release-12-0-3:
1489
1490 Release 12.0.3 - 2022-04-29
1491 ---------------------------
1492
1493 Improvements
1494 ^^^^^^^^^^^^
1495
1496 * [:doc:`/reference/commands/logical_count`] Improved memory usage while ``logical_count`` executed.
1497
1498 Up to now, Groonga had been keeping objects(objects are tables and columns and indexes, and so on) and temporary tables that were allocated while ``logical_count`` executed until the execution of ``logical_count`` finished.
1499
1500 Groonga reduces reference immediately after processing a shard by this feature.
1501 Therefore, Groonga can release memory while ``logical_count`` executed.
1502 The usage of memory of Groonga may reduce because of these reasons.
1503
1504 This improvement is only valid for the reference count mode.
1505 We can valid the reference count mode by setting ``GRN_ENABLE_REFERENCE_COUNT=yes``.
1506
1507 In addition, Groonga releases temporary tables dynamically while ``logical_count`` is executed by this feature.
1508 Therefore, the usage of memory of Groonga reduces.
1509 This improvement is valid even if we don't set the reference count mode.
1510
1511 * [:doc:`/reference/commands/dump`] Added support for ``MISSING_IGNORE/MISSING_NIL``.
1512
1513 If columns had ``MISSING_IGNORE/MISSING_NIL``, the dump of these columns had failed until now.
1514 ``dump`` command supports these columns since this release.
1515
1516 * [:doc:`/reference/functions/snippet`],[:doc:`/reference/functions/snippet_html`] Added support for text vector as input. [groonga-dev,04956][Reported by shinonon]
1517
1518 For example, we can extract snippets of target text around search keywords against vector in JSON data as below.
1519
1520 .. code-block::
1521
1522 table_create Entries TABLE_NO_KEY
1523 column_create Entries title COLUMN_SCALAR ShortText
1524 column_create Entries contents COLUMN_VECTOR ShortText
1525
1526 table_create Tokens TABLE_PAT_KEY ShortText --default_tokenizer TokenNgram --normalizer NormalizerNFKC130
1527 column_create Tokens entries_title COLUMN_INDEX|WITH_POSITION Entries title
1528 column_create Tokens entries_contents COLUMN_INDEX|WITH_SECTION|WITH_POSITION Entries contents
1529
1530 load --table Entries
1531 [
1532 {
1533 "title": "Groonga and MySQL",
1534 "contents": [
1535 "Groonga is a full text search engine",
1536 "MySQL is a RDBMS",
1537 "Mroonga is a MySQL storage engine based on Groonga"
1538 ]
1539 }
1540 ]
1541
1542 select Entries\
1543 --output_columns 'snippet_html(contents), contents'\
1544 --match_columns 'title'\
1545 --query Groonga
1546 [
1547 [
1548 0,
1549 0.0,
1550 0.0
1551 ],
1552 [
1553 [
1554 [
1555 1
1556 ],
1557 [
1558 [
1559 "snippet_html",
1560 null
1561 ],
1562 [
1563 "contents",
1564 "ShortText"
1565 ]
1566 ],
1567 [
1568 [
1569 "<span class=\"keyword\">Groonga</span> is a full text search engine",
1570 "Mroonga is a MySQL storage engine based on <span class=\"keyword\">Groonga</span>"
1571 ],
1572 [
1573 "Groonga is a full text search engine",
1574 "MySQL is a RDBMS",
1575 "Mroonga is a MySQL storage engine based on Groonga"
1576 ]
1577 ]
1578 ]
1579 ]
1580 ]
1581
1582 Until now, if we specified ``snippet*`` like ``--output_columns 'snippet_html(contents[1])``,
1583 we could extract snippets of target text around search keywords against the vector as below.
1584 However, we didn't know which we should output elements. Because we didn't know which element was hit on search.
1585
1586 .. code-block::
1587
1588 select Entries\
1589 --output_columns 'snippet_html(contents[0]), contents'\
1590 --match_columns 'title'\
1591 --query Groonga
1592 [
1593 [
1594 0,
1595 0.0,
1596 0.0
1597 ],
1598 [
1599 [
1600 [
1601 1
1602 ],
1603 [
1604 [
1605 "snippet_html",
1606 null
1607 ],
1608 [
1609 "contents",
1610 "ShortText"
1611 ]
1612 ],
1613 [
1614 [
1615 "<span class=\"keyword\">Groonga</span> is a full text search engine"
1616 ],
1617 [
1618 "Groonga is a full text search engine",
1619 "MySQL is a RDBMS",
1620 "Mroonga is a MySQL storage engine based on Groonga"
1621 ]
1622 ]
1623 ]
1624 ]
1625 ]
1626
1627 * [``vector_join``] Added a new function ``vector_join()``.[groonga-dev,04956][Reported by shinonon]
1628
1629 This function can concatenate each elements.
1630 We can specify delimiter in the second argument in this function.
1631
1632 For example, we could execute ``snippet()`` and ``snippet_html()`` against vector that concatenate each elements as below.
1633
1634 .. code-block::
1635
1636 plugin_register functions/vector
1637
1638 table_create Entries TABLE_NO_KEY
1639 column_create Entries title COLUMN_SCALAR ShortText
1640 column_create Entries contents COLUMN_VECTOR ShortText
1641
1642 table_create Tokens TABLE_PAT_KEY ShortText --default_tokenizer TokenNgram --normalizer NormalizerNFKC130
1643 column_create Tokens entries_title COLUMN_INDEX|WITH_POSITION Entries title
1644 column_create Tokens entries_contents COLUMN_INDEX|WITH_SECTION|WITH_POSITION Entries contents
1645
1646 load --table Entries
1647 [
1648 {
1649 "title": "Groonga and MySQL",
1650 "contents": [
1651 "Groonga is a full text search engine",
1652 "MySQL is a RDBMS",
1653 "Mroonga is a MySQL storage engine based on Groonga"
1654 ]
1655 }
1656 ]
1657
1658 select Entries\
1659 --output_columns 'snippet_html(vector_join(contents, "\n")), contents'\
1660 --match_columns 'title'\
1661 --query Groonga --output_pretty yes
1662 [
1663 [
1664 0,
1665 1650849001.524027,
1666 0.0003361701965332031
1667 ],
1668 [
1669 [
1670 [
1671 1
1672 ],
1673 [
1674 [
1675 "snippet_html",
1676 null
1677 ],
1678 [
1679 "contents",
1680 "ShortText"
1681 ]
1682 ],
1683 [
1684 [
1685 "<span class=\"keyword\">Groonga</span> is a full text search engine\nMySQL is a RDBMS\nMroonga is a MySQL storage engine based on <span class=\"keyword\">Groonga</span>"
1686 ],
1687 [
1688 "Groonga is a full text search engine","MySQL is a RDBMS","Mroonga is a MySQL storage engine based on Groonga"
1689 ]
1690 ]
1691 ]
1692 ]
1693 ]
1694
1695 * [:doc:`/reference/indexing`] Ignore too large a token like online index construction. [GitHub:pgroonga/pgroonga#209][Reported by Zhanzhao (Deo) Liang]
1696
1697 Groonga doesn't occur error, but Groonga ignores too large a token when we execute static index construction.
1698 However, Groonga output warning in this case.
1699
1700 Fixes
1701 ^^^^^
1702
1703 * Fixed a bug that we may be not able to add a key to a table of patricia trie.
1704
1705 This bug occurs in the following conditon.
1706
1707 * If a table of patricia trie already has a key.
1708 * If the additional key is 4096 bytes.
1709
1710 Known Issues
1711 ^^^^^^^^^^^^
1712
1713 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
1714
1715 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
1716 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
1717
1718 * ``'content @ "Groonga" *< content @ "Mroonga"'``
1719
1720 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
1721
1722 Thanks
1723 ^^^^^^
1724
1725 * shinonon
1726 * Zhanzhao (Deo) Liang
1727
1728 .. _release-12-0-2:
1729
1730 Release 12.0.2 - 2022-03-29
1731 ---------------------------
1732
1733 Improvements
1734 ^^^^^^^^^^^^
1735
1736 * [:doc:`/reference/commands/logical_range_filter`] Added support for reducing reference immediately after processing a shard.
1737
1738 Groonga had reduced reference all shards when the finish of ``logical_range_filter`` until now.
1739 Groonga reduces reference immediately after processing a shard by this feature.
1740 The usage of memory may reduce while ``logical_range_filter`` executes by this feature.
1741
1742 This feature is only valid for the reference count mode.
1743 We can valid the reference count mode by setting ``GRN_ENABLE_REFERENCE_COUNT=yes``.
1744
1745 Normally, Groonga keep objects(tables and column and index, and so on) that Groonga opened even once on memory.
1746 However, if we open many objects, Groonga uses much memory.
1747 In the reference count mode release objects that are not referenced anywhere from memory.
1748 The usage of memory of Groonga may reduce by this.
1749
1750 * We increased the stability of the feature of recovering on crashes.
1751
1752 This feature is experimental and it is disabled by default.
1753 Therefore, the following improvements are no influence on ordinary users.
1754
1755 * We fixed a bug that the index was broken when Groonga crashed.
1756 * We fixed a bug that might remain a lock.
1757 * We fixed a bug that Groonga crashed while it was recovering the crash.
1758
1759 * Improved performance for mmap if anonymous mmap available.[GitHub:MariaDB/server#1999][Suggested by David CARLIER]
1760
1761 The performance of Groonga is improved a bit by this improvement.
1762
1763 * [:doc:`/reference/indexing`] Added support for the static index construction against the following types of columns.
1764
1765 * The non-reference vector column with weight
1766 * The reference vector column with weight
1767 * The reference scalar column
1768
1769 These columns have not supported the static index construction until now.
1770 Therefore, the time of making the index has longed even if we set the index against these columns after we loaded data into them.
1771 By this improvement, the time of making the index is short in this case.
1772
1773 * [:doc:`/reference/commands/column_create`] Added new flags ``MISSING_*`` and ``INVALID_*``.
1774
1775 We added the following new flags for ``column_create``.
1776
1777 * ``MISSING_ADD``
1778 * ``MISSING_IGNORE``
1779 * ``MISSING_NIL``
1780
1781 * ``INVALID_ERROR``
1782 * ``INVALID_WARN``
1783 * ``INVALID_IGNORE``
1784
1785 Normally, if the data column is a reference data column and the nonexistent key is specified, a new record for the nonexistent key is newly created automatically.
1786
1787 The behavior that Groonga adds the key automatically into the column of reference destination is useful in the search like tag search.
1788 Because Groonga adds data automatically when we load data.
1789
1790 However, this behavior is inconvenient if we need the other data except for the key.
1791 Because a record that only has the key exists.
1792
1793 We can change this behavior by using flags that are added in this release.
1794
1795 * ``MISSING_ADD``: This is the default value. This is the same behavior as the current.
1796
1797 If the data column is a reference data column and the nonexistent key is specified, a new record for the nonexistent key is newly created automatically.
1798
1799 * ``MISSING_IGNORE``:
1800
1801 If the data column is a reference data column and the nonexistent key is specified, the nonexistent key is ignored.
1802 If the reference data column is a scalar column, the value is ``GRN_ID_NIL``.
1803 If the reference data column is a vector column, the element is just ignored as below ::
1804
1805 ["existent1", "nonexistent", "existent2"] ->
1806 ["existent1" "existent2"]
1807
1808 * ``MISSING_NIL``:
1809
1810 If the data column is a reference data column and the nonexistent key is specified, the nonexistent key in a scalar column and a vector column is treated as ``GRN_ID_NIL`` ::
1811
1812 ["existent1", "nonexistent", "existent2"] ->
1813 ["existent1", "" (GRN_ID_NIL), "existent2"]
1814
1815
1816 * ``INVALID_ERROR``: This is the default value. This is the same behavior as the current except an error response of a vector column case.
1817
1818 If we set the invalid value (e.g.: ``XXX`` for ``UInt8`` scalar column), the set operation is treated as an error.
1819 If the data column is a scalar column, ``load`` reports an error in log and response.
1820 If the data column is a vector column, ``load`` reports an error in log but doesn't report an error in response.
1821 This is an incompatible change.
1822
1823 * ``INVALID_WARN``:
1824
1825 If we set the invalid value (e.g.: ``XXX`` for ``UInt8`` scalar column), a warning message is logged and the set operation is ignored.
1826 If the target data column is a reference vector data column, ``MISSING_IGNORE`` and ``MISSING_NIL`` are used to determine the behavior.
1827
1828 * ``INVALID_IGNORE``:
1829
1830 If we set the invalid value (e.g.: ``XXX`` for ``UInt8`` scalar column), the set operation is ignored.
1831 If the target data column is a reference vector data column, ``MISSING_IGNORE`` and ``MISSING_NIL`` are used to determine the behavior.
1832
1833 * [:doc:`/reference/commands/dump`][:doc:`/reference/commands/column_list`] Added support for ``MISSING_*`` and ``INVALID_*`` flags.
1834
1835 These commands doesn't show ``MISSING_ADD`` and ``INVALID_ERROR`` flags to keep backward compatibility.
1836 Because these flags show the default behavior.
1837
1838 * [:doc:`/reference/commands/schema`] Added support for ``MISSING_*`` and ``INVALID_*`` flags.
1839
1840 ``MISSING_AND`` and ``INVALID_ERROR`` flags aren't shown in ``flags`` to keep backward compatibility.
1841 However, new ``missing`` and ``invalid`` keys are added to each column.
1842
1843 * We provided the package of Amazon Linux 2.
1844
1845 * [Windows] Dropped support for building with Visual Studio 2017.
1846
1847 Because we could not use windows-2016 image on GitHub Actions.
1848
1849 Known Issues
1850 ^^^^^^^^^^^^
1851
1852 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
1853
1854 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
1855 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
1856
1857 * ``'content @ "Groonga" *< content @ "Mroonga"'``
1858
1859 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
1860
1861 Thanks
1862 ^^^^^^
1863
1864 * David CARLIER
1865
1866 .. _release-12-0-1:
1867
1868 Release 12.0.1 - 2022-02-28
1869 ---------------------------
1870
1871 Improvements
1872 ^^^^^^^^^^^^
1873
1874 * [:doc:`/reference/commands/query_expand`] Added a support for synonym group.
1875
1876 Until now, We had to each defined a keyword and synonyms of the keyword as below when we use the synonym search.
1877
1878 .. code-block::
1879
1880 table_create Thesaurus TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
1881 # [[0, 1337566253.89858, 0.000355720520019531], true]
1882 column_create Thesaurus synonym COLUMN_VECTOR ShortText
1883 # [[0, 1337566253.89858, 0.000355720520019531], true]
1884 load --table Thesaurus
1885 [
1886 {"_key": "mroonga", "synonym": ["mroonga", "tritonn", "groonga mysql"]},
1887 {"_key": "groonga", "synonym": ["groonga", "senna"]}
1888 ]
1889
1890 In the above case, if we search ``mroonga``, Groonga search ``mroonga OR tritonn OR "groonga mysql"`` as we intended.
1891 However, if we search ``tritonn``, Groonga search only ``tritonn``.
1892 If we want to search ``tritonn OR mroonga OR "groonga mysql"`` even if we search ``tritonn``, we need had added a definition as below.
1893
1894 .. code-block::
1895
1896 load --table Thesaurus
1897 [
1898 {"_key": "tritonn", "synonym": ["tritonn", "mroonga", "groonga mysql"]},
1899 ]
1900
1901 In many cases, if we expand ``mroonga`` to ``mroonga OR tritonn OR "groonga mysql"``, we feel we want to expand ``tritonn`` and ``"groonga mysql"`` to ``mroonga OR tritonn OR "groonga mysql"``.
1902 However, until now, we had needed additional definitions in such a case.
1903 Therefore, if target keywords for synonyms are many, we are troublesome to define synonyms.
1904 Because we need to define many similar definitions.
1905
1906 In addition, when we remove synonyms, we are troublesome because we need to execute remove against many records.
1907
1908 We can make a group by deciding on a representative synonym record since this release.
1909 For example, the all following keywords are the "mroonga" group.
1910
1911 .. code-block::
1912
1913 load --table Synonyms
1914 [
1915 {"_key": "mroonga": "representative": "mroonga"}
1916 ]
1917
1918 load --table Synonyms
1919 [
1920 {"_key": "tritonn": "representative": "mroonga"},
1921 {"_key": "groonga mysql": "representative": "mroonga"}
1922 ]
1923
1924 In this case, ``mroonga`` is expanded to ``mroonga OR tritonn OR "groonga mysql"``.
1925 In addition, ``tritonn`` and ``"groonga mysql"`` are also expanded to ``mroonga OR tritonn OR "groonga mysql"``.
1926
1927 When we want to remove synonyms, we execute just remove against a target record.
1928 For example, if we want to remove ``"groonga mysql"`` from synonyms, we just remove ``{"_key": "groonga mysql": "representative": "mroonga"}``.
1929
1930 * [:doc:`/reference/commands/query_expand`] Added a support for text vector and index.
1931
1932 We can use text vector in a synonym group as below.
1933
1934 .. code-block::
1935
1936 table_create SynonymGroups TABLE_NO_KEY
1937 [[0,0.0,0.0],true]
1938 column_create SynonymGroups synonyms COLUMN_VECTOR ShortText
1939 [[0,0.0,0.0],true]
1940 table_create Synonyms TABLE_PAT_KEY ShortText
1941 [[0,0.0,0.0],true]
1942 column_create Synonyms group COLUMN_INDEX SynonymGroups synonyms
1943 [[0,0.0,0.0],true]
1944 load --table SynonymGroups
1945 [
1946 ["synonyms"],
1947 [["rroonga", "Ruby groonga"]],
1948 [["groonga", "rroonga", "mroonga"]]
1949 ]
1950 [[0,0.0,0.0],2]
1951 query_expand Synonyms.group "rroonga"
1952 [
1953 [
1954 0,
1955 0.0,
1956 0.0
1957 ],
1958 "((rroonga) OR (Ruby groonga) OR (groonga) OR (rroonga) OR (mroonga))"
1959 ]
1960
1961 * Added support for disabling a backtrace by the environment variable.
1962
1963 We can disable output a backtrace by using ``GRN_BACK_TRACE_ENABLE``.
1964 If we set ``GRN_BACK_TRACE_ENABLE=no``, Groonga doesn't output a backtrace.
1965
1966 Groonga output backtrace to a stack area. Therefore, Groonga may crash because Groonga uses up stack area depending on the OS.
1967 In such cases, we can avoid crashes by using ``GRN_BACK_TRACE_ENABLE=no``.
1968
1969 * [:doc:`/reference/commands/select`] Improved performance for ``--slices``.
1970
1971 * [Windows] Added support for Visual Studio 2022.
1972
1973 * [:doc:`/reference/commands/select`] Added support for specifing max intervals for each elements in near search.
1974
1975 For example, we can specify max intervals for each phrase in a near phrase search.
1976 We make documentation for this feature in the future. Therefore, we will make more details later.
1977
1978 * [:doc:`/reference/executables/groonga-server-http`] We could use ``groonga-server-http`` even if Groonga of RPM packages.
1979
1980 Fixes
1981 ^^^^^
1982
1983 * [Windows] Fixed a crash bug when Groonga output backtrace.
1984
1985 Known Issues
1986 ^^^^^^^^^^^^
1987
1988 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
1989
1990 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
1991 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
1992
1993 * ``'content @ "Groonga" *< content @ "Mroonga"'``
1994
1995 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
1996
1997 .. _release-12-0-0:
1998
1999 Release 12.0.0 - 2022-02-09
2000 ---------------------------
2001
2002 This is a major version up!
2003 But It keeps backward compatibility. We can upgrade to 12.0.0 without rebuilding database.
2004
2005 First of all, we introduce the Summary of changes from Groonga 11.0.0 to 11.1.3.
2006 Then, we introduce the main changes in 12.0.0.
2007
2008 Summary of changes from Groonga 11.0.0 to 11.1.3
2009 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2010
2011 New Features and Improvements
2012 """""""""""""""""""""""""""""
2013
2014 * [:doc:`/reference/functions/snippet`] Added support for using the keyword of 32 or more.
2015
2016 We could not specify the keyword of 32 or more with snippet until now.
2017 However, we can specify the keyword of 32 or more by this improvement.
2018
2019 We don't specify the keyword of 32 or more with snippet in normal use.
2020 However, if the keyword increments automatically by using such as ``query_expand``, the number of target keywords may be 32 or more.
2021
2022 In this case, Groonga occurs an error until now. However, Groonga doesn't occur an error by this improvement.
2023
2024 See :ref:`release 11.1.3 <release-11-1-3>` for details.
2025
2026 * [:doc:`/reference/normalizers/normalizer_nfkc130`] Added a new option ``remove_symbol``.
2027
2028 This option removes symbols (e.g. #, !, “, &, %, …) from the string that the target of normalizing.
2029 For example, this option useful when we prevent orthographical variants such as a title of song and name of artist, and a name of store.
2030
2031 See :ref:`release 11.1.3 <release-11-1-3>` for details.
2032
2033 * [:doc:`/reference/commands/load`] Added support for ISO 8601 time format.
2034
2035 ISO 8601 format is the format generally.
2036 Therefore ``load`` becomes easy to use by Groonga support the more standard format.
2037
2038 See :ref:`release 11.1.0 <release-11-1-0>` for details.
2039
2040 * [:doc:`/reference/functions/snippet`] Added a new option ``delimiter_regexp`` for detecting snippet delimiter with regular expression.
2041
2042 This feature is useful in that we want to show by the sentence the result of the search.
2043
2044 :doc:`/reference/functions/snippet` extracts text around search keywords.
2045 We call the text that is extracted by :doc:`/reference/functions/snippet` snippet.
2046
2047 Normally, :doc:`/reference/functions/snippet` () returns the text of 200 bytes around search keywords.
2048 However, :doc:`/reference/functions/snippet` () gives no thought to a delimiter of sentences.
2049 The snippet may be composed of multi sentences.
2050
2051 ``delimiter_regexp`` option is useful if we want to only extract the text of the same sentence as search keywords.
2052 For example, we can use ``\.\s*`` to extract only text in the target sentence.
2053 Note that you need to escape ``\`` in string.
2054
2055 See :ref:`release 11.0.9 <release-11-0-9>` for details.
2056
2057 * [:doc:`/reference/commands/cache_limit`] Groonga remove query cache when we execute ``cache_limit 0``.
2058
2059 Groonga stores query cache to internally table.
2060 The maximum total size of keys of this table is 4GiB. Because this table is hash table.
2061 Therefore, If we execute many huge queries, Groonga may be unable to store query cache, because the maximum total size of keys may be over 4GiB.
2062 In such cases, We can clear the table for query cache by using ``cache_limit 0``, and Groonga can store query cache
2063
2064 We needed to restart Groonga to resolve this problem until now.
2065 However, We can resolve this problem if we just execute ``cache_limit 0`` by this improvement.
2066
2067 See :ref:`release 11.0.6 <release-11-0-6>` for details.
2068
2069 * [:doc:`/reference/functions/between`] Added support for optimizing the order of evaluation of a conditional expression.
2070
2071 We can use the optimization of the order of evaluation of a conditional expression in ``between()`` by setting ``GRN_EXPR_OPTIMIZE=yes``.
2072 This optimization is effective with respect if ``between()`` narrow down records enough or ``between()`` can't narrow down few records.
2073
2074 * [:doc:`/reference/log`] Added support for outputting to stdout and stderr.
2075
2076 This feature is useful when we execute Groonga on Docker.
2077 Docker has the feature that records stdout and stderr in standard.
2078 Therefore, we don't need to login into the environment of Docker to get Groonga's log.
2079
2080 See :ref:`release 11.0.4 <release-11-0-4>` for details.
2081
2082 * [:doc:`/reference/functions/query`] Added support for ignoring ``TokenFilterStem`` and ``TokenFilterStopWord`` by the query.
2083
2084 We are able to search without ``TokenFilterStem`` and ``TokenFilterStopWord`` in only a specific query.
2085
2086 This feature is useful when we want to search for the same words exactly as a search keyword.
2087 Normally, Groonga gets better results with enable stemming and stopwords excepting.
2088 However, if we want to search words the same as a keyword of search exactly, These features are needless.
2089
2090 Until now, If we want to search words the same as a keyword of search exactly,
2091 We needed to make the index of the exclusive use.
2092 By this improvement, we can search words the same as a keyword of search exactly
2093 without making the index of the exclusive use.
2094
2095 See :ref:`release 11.0.3 <release-11-0-3>` for details.
2096
2097 * [:doc:`/reference/functions/string_slice`] Added a new function ``string_slice()``.
2098
2099 ``string_slice()`` extracts a substring of a string of search results by position or regular expression.
2100 This function is useful if we want to edit search results.
2101
2102 For example, this feature is useful in that we exclude tags from search results.
2103
2104 * [:doc:`/reference/functions/query_parallel_or`] Added a new function for processing queries in parallel.
2105
2106 ``query_parallel_or`` is similar to query but ``query_parallel_or`` processes query that has multiple OR conditions in parallel.
2107 We can increase in speed of the execution of many OR conditions by using this function.
2108
2109 However, ``query_parallel_or`` alone uses multiple CPUs.
2110 Therefore, queries that are executing at the same time as the query that executes ``query_parallel_or`` may be slow.
2111
2112 * [:doc:`/reference/token_filters`] Added support for multiple token filters with options.
2113
2114 We can use multiple token filters with options as the following example.
2115
2116 .. code-block::
2117
2118 --token_filters 'TokenFilterStopWord("column", "ignore"), TokenFilterNFKC130("unify_kana", true)'
2119
2120 * [:doc:`/reference/commands/select`] Added support for ``--post_filter`` and ``--slices[].post_filter``.
2121
2122 We can filter again after we execute ``--filter`` by using ``--post_filter`` and ``--slices[].post_filter``.
2123 The difference between ``--post_filter`` and ``--slices[].post_filter`` is response format.
2124
2125 The response format of ``--post_filter`` same as the response of ``--filter``.
2126 The response format of ``--slices[].post_filter`` show the result of before and after ``--slices[].post_filter`` executed.
2127
2128 Note that if we use ``--slices[].post_filter``, the format of the response is different from the normal ``select`` 's response.
2129
2130 Fixes
2131 """""
2132
2133 * Fixed a bug that the version up of Groonga failed Because the version up of arrow-libs on which Groonga depends.
2134
2135 However, if arrow-libs update a major version, this problem reproduces.
2136 In this case, we will handle that by rebuilding the Groonga package.
2137
2138 This bug only occurs AlmaLinux 8 and CentOS 7.
2139
2140 * [Windows] Fixed a resource leak when Groonga fail open a new file caused by out of memory.
2141
2142 * Fixed a bug that Groonga may not have returned a result of a search query if we sent many search queries when tokenizer, normalizer, or token_filters that support options were used.
2143
2144 * Fixed a bug that there is possible that index is corrupt when Groonga executes many additions, delete, and update information in it.
2145
2146 This bug occurs when we only execute many delete information from index.
2147 However, it doesn’t occur when we only execute many additions information into index.
2148
2149 See :ref:`release 11.0.0 <release-11-0-0>` for details.
2150
2151 Newly supported OSes
2152 """"""""""""""""""""
2153
2154 * [:doc:`/install/almalinux`] Added support for AlmaLinux 8.
2155
2156 * [:doc:`/install/almalinux`] Added support for AlmaLinux 8 for ARM64.
2157
2158 * [:doc:`/install/debian`] Added support for Debian 11 (Bullseye).
2159
2160 * [:doc:`/install/debian`] Added support for Debian 11 (Bullseye) for ARM64 and Debian 10 (buster) for ARM64.
2161
2162 * [:doc:`/install/ubuntu`] Added support for Ubuntu 21.10 (Impish Indri).
2163
2164 Dropped support OSes
2165 """"""""""""""""""""
2166
2167 * [:doc:`/install/centos`] Dropped support for CentOS 8.
2168
2169 * [:doc:`/install/ubuntu`] Dropped support for Ubuntu 21.04 (Hirsute Hippo).
2170
2171 * [:doc:`/install/ubuntu`] Dropped support for Ubuntu 20.10 (Groovy Gorilla).
2172
2173 * [:doc:`/install/ubuntu`] Dropped support for Ubuntu 16.04 LTS (Xenial Xerus).
2174
2175 * [:doc:`/install/windows`] Dropped support for the following packages of Windows version that we had cross-compiled by using MinGW on Linux.
2176
2177 * groonga-x.x.x-x86.exe
2178 * groonga-x.x.x-x86.zip
2179 * groonga-x.x.x-x64.exe
2180 * groonga-x.x.x-x86.zip
2181
2182 Thanks
2183 """"""
2184
2185 * naoa
2186 * Anthony M. Cook
2187 * MASUDA Kazuhiro
2188 * poti
2189 * Takashi Hashida
2190 * higchi
2191 * wi24rd
2192 * Josep Sanz
2193 * Keitaro YOSHIMURA
2194 * shibanao4870
2195
2196 The main changes in 12.0.0 are as follows.
2197
2198 Improvements
2199 ^^^^^^^^^^^^
2200
2201 * [:doc:`/reference/functions/sub_filter`] Added a new option ``pre_filter_threshold``.
2202
2203 We can change the value of ``GRN_SUB_FILTER_PRE_FILTER_THRESHOLD`` by this option.
2204 If the number of records is less than ``GRN_SUB_FILTER_PRE_FILTER_THRESHOLD`` when Groonga executes ``sub_filter``, Groonga execute ``sub_filter`` against records that have been already narrowed down.
2205
2206 We can use -1 to always use this optimization.
2207
2208 * [index_column_have_source_record] Added a new function ``index_column_have_source_record()``.
2209
2210 We can confirm whether a token that is existing in the index is included in any of the records that are registered in Groonga or not.
2211
2212 Groonga does not remove a token even if the token become never used from records in Groonga by updating records.
2213 Therefore, for example, when we use the feature of autocomplete, Groonga may return a token that is not included in any of the records as candidates for search words.
2214 However, we can become that we don't return the needless token by using this function.
2215
2216 Because this function can detect a token that is not included in any of the records.
2217
2218 * [:doc:`/reference/normalizers/normalizer_nfkc130`] Added a new option ``strip``
2219
2220 This option removes spaces from the start and the end as below.
2221
2222 .. code-block::
2223
2224 normalize \
2225 'NormalizerNFKC121("strip", true, \
2226 "report_source_offset", true)' \
2227 " hello world\t! \t " \
2228 WITH_CHECKS|WITH_TYPES
2229 [
2230 [
2231 0,
2232 0.0,
2233 0.0
2234 ],
2235 {
2236 "normalized": "hello world!",
2237 "types": [
2238 "alpha",
2239 "alpha",
2240 "alpha",
2241 "alpha",
2242 "alpha",
2243 "others",
2244 "alpha",
2245 "alpha",
2246 "alpha",
2247 "alpha",
2248 "alpha|blank",
2249 "symbol|blank"
2250 ],
2251 "checks": [
2252 3,
2253 1,
2254 1,
2255 1,
2256 1,
2257 1,
2258 1,
2259 1,
2260 1,
2261 1,
2262 1,
2263 2
2264 ],
2265 "offsets": [
2266 0,
2267 3,
2268 4,
2269 5,
2270 6,
2271 7,
2272 8,
2273 9,
2274 10,
2275 11,
2276 12,
2277 14
2278 ]
2279 }
2280 ]
2281
2282 * [:doc:`/reference/commands/select`] Added new arguments ``drilldown_max_n_target_records`` and ``drilldown[${LABEL}].max_n_target_records``.
2283
2284 We can specify the max number of records of the drilldown target table (filtered result) to use drilldown.
2285 If the number of filtered result is larger than the specified value, some records in filtered result aren't used for drilldown.
2286 The default value of this arguments are ``-1``.
2287 If these arguments are set ``-1``, Groonga uses all records for drilldown.
2288
2289 This argument is useful when filtered result may be very large.
2290 Because a drilldown against large filtered result may be slow.
2291 We can limit the max number of records to be used for drilldown by this feature.
2292
2293 Here is an example to limit the max number of records to be used for drilldown.
2294 The last 2 records, ``{\"_id\": 4, \"tag\": \"Senna\"}`` and ``{\"_id\": 5, \"tag\": \"Senna\"}``, aren't used.
2295
2296 .. code-block::
2297
2298 table_create Entries TABLE_HASH_KEY ShortText
2299 column_create Entries content COLUMN_SCALAR Text
2300 column_create Entries n_likes COLUMN_SCALAR UInt32
2301 column_create Entries tag COLUMN_SCALAR ShortText
2302
2303 table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
2304 column_create Terms entries_key_index COLUMN_INDEX|WITH_POSITION Entries _key
2305 column_create Terms entries_content_index COLUMN_INDEX|WITH_POSITION Entries content
2306 load --table Entries
2307 [
2308 {"_key": "The first post!",
2309 "content": "Welcome! This is my first post!",
2310 "n_likes": 5,
2311 "tag": "Hello"},
2312 {"_key": "Groonga",
2313 "content": "I started to use Groonga. It's very fast!",
2314 "n_likes": 10,
2315 "tag": "Groonga"},
2316 {"_key": "Mroonga",
2317 "content": "I also started to use Mroonga. It's also very fast! Really fast!",
2318 "n_likes": 15,
2319 "tag": "Groonga"},
2320 {"_key": "Good-bye Senna",
2321 "content": "I migrated all Senna system!",
2322 "n_likes": 3,
2323 "tag": "Senna"},
2324 {"_key": "Good-bye Tritonn",
2325 "content": "I also migrated all Tritonn system!",
2326 "n_likes": 3,
2327 "tag": "Senna"}
2328 ]
2329
2330 select Entries \
2331 --limit -1 \
2332 --output_columns _id,tag \
2333 --drilldown tag \
2334 --drilldown_max_n_target_records 3
2335 [
2336 [
2337 0,
2338 1337566253.89858,
2339 0.000355720520019531
2340 ],
2341 [
2342 [
2343 [
2344 5
2345 ],
2346 [
2347 [
2348 "_id",
2349 "UInt32"
2350 ],
2351 [
2352 "tag",
2353 "ShortText"
2354 ]
2355 ],
2356 [
2357 1,
2358 "Hello"
2359 ],
2360 [
2361 2,
2362 "Groonga"
2363 ],
2364 [
2365 3,
2366 "Groonga"
2367 ],
2368 [
2369 4,
2370 "Senna"
2371 ],
2372 [
2373 5,
2374 "Senna"
2375 ]
2376 ],
2377 [
2378 [
2379 2
2380 ],
2381 [
2382 [
2383 "_key",
2384 "ShortText"
2385 ],
2386 [
2387 "_nsubrecs",
2388 "Int32"
2389 ]
2390 ],
2391 [
2392 "Hello",
2393 1
2394 ],
2395 [
2396 "Groonga",
2397 2
2398 ]
2399 ]
2400 ]
2401 ]
2402
2403 * [httpd] Updated bundled nginx to 1.21.6.