Debian Codegraph @

doc/source/news/13.md

raw symbols SCIP
1 # News - 13 series
2
3 (release-13-1-1)=
4
5 ## Release 13.1.1 - 2024-01-09
6
7 ### Improvements
8
9 - Dropped support for mingw32. [GitHub#1654]
10
11 - Added support for index search of "vector_column[N] OPERATOR literal" with `--match_columns` and `--query`.
12
13 ### Fixes
14
15 - [{doc}`/install/windows`] Bundled `groonga-normalizer-mysql` again. [GitHub#1655]
16
17 Groonga 13.1.0 for Windows didn't include `groonga-normalizer-mysql`.
18 This problem only occured in Groonga 13.1.0.
19
20 (release-13-1-0)=
21
22 ## Release 13.1.0 - 2023-12-26
23
24 ### Improvements
25
26 - [{doc}`/reference/commands/select`] Groonga also cached trace log.
27
28 - Added support for outputting `dict<string>` in a responce of Apache Arrow format.
29
30 - [{doc}`/reference/executables/groonga-server-http`] Added support for new content type `application/vnd.apache.arrow.stream`
31
32 - [{doc}`/reference/functions/query`] Added support empty input as below.
33
34 ```
35 table_create Users TABLE_NO_KEY
36 column_create Users name COLUMN_SCALAR ShortText
37
38 table_create Lexicon TABLE_HASH_KEY ShortText --default_tokenizer TokenBigramSplitSymbolAlphaDigit --normalizer NormalizerAuto
39 column_create Lexicon users_name COLUMN_INDEX|WITH_POSITION Users name
40 load --table Users
41 [
42 {"name": "Alice"},
43 {"name": "Alisa"},
44 {"name": "Bob"}
45 ]
46
47 select Users --output_columns name,_score --filter 'query("name", "   ")'
48 [
49 [
50 0,
51 0.0,
52 0.0
53 ],
54 [
55 [
56 [
57 0
58 ],
59 [
60 [
61 "name",
62 "ShortText"
63 ],
64 [
65 "_score",
66 "Int32"
67 ]
68 ]
69 ]
70 ]
71 ]
72 ```
73
74 - Added support for BFloat16(experimental)
75
76 We can just load and select BFloat16.
77 We can't use arithmetic operations such as `bfloat16_value - 1.2`.
78
79 - [{doc}`/reference/commands/column_create`] Added new flag `WEIGHT_BFLOAT16`.
80
81 ### Fixes
82
83 - [{doc}`/reference/commands/select`] Fixed a bug that when Groonga cached `output_pretty=yes` result, Groonga returned a query with `output_pretty` even if we sent a query without `output_pretty`.
84
85 - Fixed a wrong data created bug.
86
87 In general, users can't do this explicitly because the command API doesn't accept `GRN_OBJ_{APPEND,PREPEND}`.
88 This may be used internally when a dynamic numeric vector column is created and a temporary result set is created (OR is used).
89
90 For example, the following query may create wrong data:
91
92 ```
93 select TABLE \
94 --match_columns TEXT_COLUMN \
95 --query 'A B OR C' \
96 --columns[NUMERIC_DYNAMIC_COLUMN].stage result_set \
97 --columns[NUMERIC_DYNAMIC_COLUMN].type Float32 \
98 --columns[NUMERIC_DYNAMIC_COLUMN].flags COLUMN_VECTOR
99 ```
100
101 If this is happen, `NUMERIC_DYNAMIC_COLUMN` contains many garbage elements.
102 It also causes too much memory consumption.
103
104 Note that this is caused by an uninitialized variable on stack.
105 So this may or may not be happen.
106
107 - Fixed a bug that may fail to set valid `normalizers/token_filters`.
108
109 - [fuzzy_search] Fixed a crash bug when the following three conditions established.
110
111 1. Query has 2 or more multi-byte characters.
112 2. `${ASCII}${ASCII}${MULTIBYTE}*` characters in a patricia trie table.
113 3. `WITH_TRANSPOSITION` is enabled.
114
115 For example, "aaあ" in a patricia trie table with query "あああ" pair has this problem as below.
116
117 ```
118 table_create Users TABLE_NO_KEY
119 column_create Users name COLUMN_SCALAR ShortText
120
121 table_create Names TABLE_PAT_KEY ShortText
122 column_create Names user COLUMN_INDEX Users name
123 load --table Users
124 [
125 {"name": "aaあ"},
126 {"name": "あうi"},
127 {"name": "あう"},
128 {"name": "あi"},
129 {"name": "iう"}
130 ]
131 select Users
132 --filter 'fuzzy_search(name, "あiう", {"with_transposition": true, "max_distance": 3})'
133 --output_columns 'name, _score'
134 --match_escalation_threshold -1
135 ```
136
137 (release-13-0-9)=
138
139 ## Release 13.0.9 - 2023-10-29
140
141 ### Improvements
142
143 - [{doc}`/reference/commands/select`] Changed the default value of `--fuzzy_max_expansions` from 0 to 10.
144
145 `--fuzzy_max_expansions` can limit number of words that has close edit distance to use search process.
146 This argument can help to balance hit numbers and performance of the search.
147 When `--fuzzy_max_expansions` is 0, the search use all words that the edit distance are under `--fuzzy_max_distance` in the vocabulary list.
148
149 `--fuzzy_max_expansions` is 0 (unlimited) may slow down a search. Therefore, the default value of `--fuzzy_max_expansions` is 10 from this release.
150
151 - [{doc}`/reference/commands/select`] Improved `select` arguments with addition new argument `--fuzzy_with_transposition` (experimental).
152
153 We can choose edit distance `1` or `2` for the transposition case by using this argument.
154
155 If this parameter is `yes`, the edit distance of this case is `1`. It's `2` otherwise.
156
157 - [{doc}`/reference/commands/select`] Improved `select` arguments with addition new argument `--fuzzy_tokenize`.
158
159 When `--fuzzy_tokenize` is `yes`, Groonga use tokenizer that specifies in `--default_tokenizer` in typo tolerance search.
160
161 The default value of `--fuzzy_tokenize` is `no`. The useful case of `--fuzzy_tokenize` is the following case.
162
163 - Search targets are only Japanese data.
164 - Specify `TokenMecab` in `--default_tokenizer`.
165
166 - [{doc}`/reference/commands/load`] Added support for `--ifexists` even if we specified `apache-arrow` into `input_type`.
167
168 - [{doc}`/reference/normalizers`] Improved `NormalizerNFKC*` options with addition new option `remove_blank_force`.
169
170 When `remove_blank_force` is `false`, Normalizer doesn't ignore space as below.
171
172 ```
173 table_create Entries TABLE_NO_KEY
174 column_create Entries body COLUMN_SCALAR ShortText
175
176 load --table Entries
177 [
178 {"body": "Groonga はとても速い"},
179 {"body": "Groongaはとても速い"}
180 ]
181
182 select Entries --output_columns \
183 'highlight(body, \
184 "gaはとても", "<keyword>", "</keyword>", \
185 {"normalizers": "NormalizerNFKC150(\\"remove_blank_force\\", false)"} \
186 )'
187 [
188 [
189 0,
190 0.0,
191 0.0
192 ],
193 [
194 [
195 [
196 2
197 ],
198 [
199 [
200 "highlight",
201 null
202 ]
203 ],
204 [
205 "Groonga はとても速い"
206 ],
207 [
208 "Groon<keyword>gaはとても</keyword>速い"
209 ]
210 ]
211 ]
212 ]
213 ```
214
215 - [{doc}`/reference/commands/select`] Improved `select` arguments with addition new argument `--output_trace_log` (experimental).
216
217 If we specify `yes` in `--output_trace_log` and `--command_version 3`, Groonga output addition new log as below.
218
219 ```
220 table_create Memos TABLE_NO_KEY
221 column_create Memos content COLUMN_SCALAR ShortText
222
223 table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenNgram --normalizer NormalizerNFKC150
224 column_create Lexicon memos_content COLUMN_INDEX|WITH_POSITION Memos content
225
226 load --table Memos
227 [
228 {"content": "This is a pen"},
229 {"content": "That is a pen"},
230 {"content": "They are pens"}
231 ]
232
233 select Memos \
234 --match_columns content \
235 --query "Thas OR ere" \
236 --fuzzy_max_distance 1 \
237 --output_columns *,_score \
238 --command_version 3 \
239 --output_trace_log yes \
240 --output_type apache-arrow
241
242 return_code: int32
243 start_time: timestamp[ns]
244 elapsed_time: double
245 error_message: string
246 error_file: string
247 error_line: uint32
248 error_function: string
249 error_input_file: string
250 error_input_line: int32
251 error_input_command: string
252 -- metadata --
253 GROONGA:data_type: metadata
254 return_code start_time elapsed_time error_message error_file error_line error_function error_input_file error_input_line error_input_command
255 0 0 1970-01-01T09:00:00+09:00 0.000000 (null) (null) (null) (null) (null) (null) (null)
256 ========================================
257 depth: uint16
258 sequence: uint16
259 name: string
260 value: dense_union<0: uint32=0, 1: string=1>
261 elapsed_time: uint64
262 -- metadata --
263 GROONGA:data_type: trace_log
264 depth sequence name value elapsed_time
265 0 1 0 ii.select.input Thas 0
266 1 2 0 ii.select.exact.n_hits 0 1
267 2 2 0 ii.select.fuzzy.input Thas 2
268 3 2 1 ii.select.fuzzy.input.actual that 3
269 4 2 2 ii.select.fuzzy.input.actual this 4
270 5 2 3 ii.select.fuzzy.n_hits 2 5
271 6 1 1 ii.select.n_hits 2 6
272 7 1 0 ii.select.input ere 7
273 8 2 0 ii.select.exact.n_hits 2 8
274 9 1 1 ii.select.n_hits 2 9
275 ========================================
276 content: string
277 _score: double
278 -- metadata --
279 GROONGA:n_hits: 2
280 content _score
281 0 This is a pen 1.000000
282 1 That is a pen 1.000000
283 ```
284
285 `--output_trace_log` is valid in only command version 3.
286
287 This will be useful for the following cases:
288
289 - Detect real words used by fuzzy query.
290 - Measure elapsed timeout without seeing query log.
291
292 - [{doc}`/reference/functions/query`] Added support for object literal.
293
294 - [{doc}`/reference/commands/query_expand`] Added support for `NPP` and `ONPP` (experimental).
295
296 - [{doc}`/reference/functions/snippet`] Added support for `normalizers` option.
297
298 We can use normalizer with option.
299 For example, when we don't want to ignore space in `snippet()` function, we use this option as below.
300
301 ```
302 table_create Entries TABLE_NO_KEY
303 column_create Entries content COLUMN_SCALAR ShortText
304
305 load --table Entries
306 [
307 {"content": "Groonga and MySQL"},
308 {"content": "Groonga and My SQL"}
309 ]
310
311 select Entries \
312 --output_columns \
313 ' snippet(content, "MySQL", "<keyword>", "</keyword>", {"normalizers": "NormalizerNFKC150(\\"remove_blank_force\\", false)"} )'
314 [
315 [
316 0,
317 0.0,
318 0.0
319 ],
320 [
321 [
322 [
323 2
324 ],
325 [
326 [
327 "snippet",
328 null
329 ]
330 ],
331 [
332 [
333 "Groonga and <keyword>MySQL</keyword>"
334 ]
335 ],
336 [
337 null
338 ]
339 ]
340 ]
341 ]
342 ```
343
344 ### Fixes
345
346 - Fixed a bug in `Time OPERATOR Float{,32}` comparison. [GH-1624](https://github.com/groonga/groonga/issues/1624)[Reported by yssrku]
347
348 Microsecond (small value than second) information in `Float{,32}` isn't used.
349 This is happen only when `Time OPERATOR Float{,32}`.
350
351 This is happen in `load --ifexists 'A OP B || C OP D'` as below.
352
353 ```
354 table_create Reports TABLE_HASH_KEY ShortText
355 column_create Reports content COLUMN_SCALAR Text
356 column_create Reports modified_at COLUMN_SCALAR Time
357
358 load --table Reports
359 [
360 {"_key": "a", "content": "", "modified_at": 1663989875.438}
361 ]
362
363 load \
364 --table Reports \
365 --ifexists 'content == "" && modified_at <= 1663989875.437'
366 ```
367
368 However, this isn't happen in `select --filter`.
369
370 - Fixed a bug that `alnum(a-zA-Z0-9) + blank` may be detected.
371
372 If the number of input is 2 such as `ab` and text with some blanks such as `a b` is matched, `a b` is detected.
373 However, it should not be detected in this case.
374
375 For example, `a i` is detected when this bug occures as below.
376
377 ```
378 table_create Entries TABLE_NO_KEY
379 column_create Entries body COLUMN_SCALAR ShortText
380
381 load --table Entries
382 [
383 {"body": "Groonga is fast"}
384 ]
385
386 select Entries \
387 --output_columns 'highlight(body, "ai", "<keyword>", "</keyword>")'
388
389 [
390 [
391 0,0.0,0.0
392 ],
393 [
394 [
395 [
396 1
397 ],
398 [
399 [
400 "highlight",
401 null
402 ]
403 ],
404 [
405 "Groong<keyword>a i</keyword>s fast"
406 ]
407 ]
408 ]
409 ]
410 ```
411
412 However, the above result is unexpected result.
413 We don't want to detect `a i` in the above case.
414
415 ### Thanks
416
417 - yssrku
418
419 (release-13-0-8)=
420
421 ## Release 13.0.8 - 2023-09-29
422
423 ### Improvements
424
425 - [{doc}`/reference/commands/column_create`] Improved `column_create` flags with addition new flags `COLUMN_FILTER_SHUFFLE`, `COLUMN_FILTER_BYTE_DELTA`, `COMPRESS_FILTER_TRUNCATE_PRECISION_1BYTE`, and `COMPRESS_FILTER_TRUNCATE_PRECISION_2BYTES`.
426
427 - Added new bundling library [Blosc](https://www.blosc.org/).
428
429 `COLUMN_FILTER_SHUFFLE`, `COLUMN_FILTER_BYTE_DELTA`, `COMPRESS_FILTER_TRUNCATE_PRECISION_1BYTE`, and `COMPRESS_FILTER_TRUNCATE_PRECISION_2BYTES` flags are require Blosc.
430
431 - [{doc}`/reference/commands/status`] Improved `status` output with addition new features `"blosc"`.
432
433 - [{doc}`/reference/executables/groonga`] Improved `groonga --version` output with addition new value `blosc`.
434
435 - [{doc}`/reference/commands/select`] Improved `select` arguments with addition new argument `--fuzzy_max_distance` (experimental).
436
437 - [{doc}`/reference/commands/select`] Improved `select` arguments with addition new argument `--fuzzy_max_expansions` (experimental).
438
439 - [{doc}`/reference/commands/select`] Improved `select` arguments with addition new argument `--fuzzy_max_distance_ratio` (experimental).
440
441 - [{doc}`/reference/commands/select`] Improved `select` arguments with addition new argument `--fuzzy_prefix_length` (experimental).
442
443 - [cast] Added support for casting `"[0.0, 1.0, 1.1, ...]"` to `Float`/`Float32` vector.
444
445 - [fuzzy_search] Rename `max_expansion` option to `max_expansions` option.
446
447 `max_expansion` option is deprecate since this release.
448 However, we can use `max_expansion` in the feature to backward compatibility.
449
450 - Rename master branch to main branch.
451
452 - [RPM] Use CMake for building.
453
454 - [Debian] Added support for Debian trixie.
455
456 ### Fixes
457
458 - [fuzzy_search] Fixed a bug that Groonga may get records that should not match.
459
460 - [{ref}`query-syntax-near-phrase-search-condition`][{ref}`script-syntax-near-phrase-search-operator`] Fixed a bug that Groonga crashed when the first phrase group doesn't match anything as below.
461
462 ```
463 table_create Entries TABLE_NO_KEY
464 column_create Entries content COLUMN_SCALAR Text
465 table_create Terms TABLE_PAT_KEY ShortText \
466 --default_tokenizer TokenNgram \
467 --normalizer NormalizerNFKC121
468 column_create Terms entries_content COLUMN_INDEX|WITH_POSITION \
469 Entries content
470 load --table Entries
471 [
472 {"content": "x y z"}
473 ]
474 select Entries \
475 --match_columns Terms.entries_content.content \
476 --query '*NPP1"(NONEXISTENT) (z)"' \
477 --output_columns '_score, content'
478 ```
479
480 (release-13-0-7)=
481
482 ## Release 13.0.7 - 2023-09-12
483
484 ### Fixes
485
486 - [{doc}`/reference/commands/normalize`] Fixed a bug that `normalize` command doesn't output last offset and type.
487
488 `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.
489
490 ```
491 table_create Normalizations TABLE_PAT_KEY ShortText
492 column_create Normalizations normalized COLUMN_SCALAR ShortText
493 load --table Normalizations
494 [
495 {"_key": "あ", "normalized": "<あ>"}
496 ]
497
498 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
499 [
500 [
501 0,
502 0.0,
503 0.0
504 ],
505 {
506 "normalized": "お<あ>a<あ>i<あ>お",
507 "types": [
508 "hiragana",
509 "symbol",
510 "hiragana",
511 "symbol",
512 "alpha",
513 "symbol",
514 "hiragana",
515 "symbol",
516 "alpha",
517 "symbol",
518 "hiragana",
519 "symbol",
520 "hiragana"
521 ],
522 "checks": [
523 3,
524 0,
525 0,
526 4,
527 -1,
528 0,
529 0,
530 -1,
531 4,
532 4,
533 -1,
534 0,
535 0,
536 -1,
537 4,
538 4,
539 -1,
540 0,
541 0,
542 -1,
543 4,
544 0,
545 0
546 ],
547 "offsets": [
548 0,
549 4,
550 4,
551 4,
552 8,
553 12,
554 12,
555 12,
556 16,
557 20,
558 20,
559 20,
560 24
561 ]
562 }
563 ]
564 ```
565
566 - [{doc}`/reference/normalizers`] Fixed a bug that the last offset value may be invalid when we use multiple normalizers.
567
568 For the following example, the last offset value is 27 correctly, but it is 17 in the following example by this bug.
569
570 ```
571 table_create Normalizations TABLE_PAT_KEY ShortText
572 column_create Normalizations normalized COLUMN_SCALAR ShortText
573 load --table Normalizations
574 [
575 {"_key": "あ", "normalized": "<あ>"}
576 ]
577
578 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
579 [
580 [
581 0,
582 0.0,
583 0.0
584 ],
585 {
586 "normalized": "お<あ>a<あ>i<あ>お",
587 "types": [
588 "hiragana",
589 "symbol",
590 "hiragana",
591 "symbol",
592 "alpha",
593 "symbol",
594 "hiragana",
595 "symbol",
596 "alpha",
597 "symbol",
598 "hiragana",
599 "symbol",
600 "hiragana",
601 "null"
602 ],
603 "checks": [
604 3,
605 0,
606 0,
607 4,
608 -1,
609 0,
610 0,
611 -1,
612 4,
613 4,
614 -1,
615 0,
616 0,
617 -1,
618 4,
619 4,
620 -1,
621 0,
622 0,
623 -1,
624 4,
625 0,
626 0
627 ],
628 "offsets": [
629 0,
630 4,
631 4,
632 4,
633 8,
634 12,
635 12,
636 12,
637 16,
638 20,
639 20,
640 20,
641 24,
642 17
643 ]
644 }
645 ]
646 ```
647
648 (release-13-0-6)=
649
650 ## Release 13.0.6 - 2023-08-31
651
652 ### Improvements
653
654 - [{doc}`/reference/functions/highlight_html`] Don't report error when we specify empty string into `highlight_html()` as below.
655
656 `highlight_html()` just returns an empty text.
657
658 ```
659 table_create Entries TABLE_NO_KEY
660 column_create Entries body COLUMN_SCALAR ShortText
661
662 table_create Terms TABLE_PAT_KEY ShortText \
663 --default_tokenizer 'TokenNgram("report_source_location", true)' \
664 --normalizer 'NormalizerNFKC150'
665 column_create Terms document_index COLUMN_INDEX|WITH_POSITION Entries body
666
667 load --table Entries
668 [
669 {"body": "ab cd ed gh"}
670 ]
671
672 select Entries \
673 --match_columns body \
674 --query 'ab' \
675 --output_columns 'highlight_html("", Terms)'
676 [
677 [
678 0,
679 0.0,
680 0.0
681 ],
682 [
683 [
684 [
685 1
686 ],
687 [
688 [
689 "highlight_html",null
690 ]
691 ],
692 [
693 ""
694 ]
695 ]
696 ]
697 ]
698 ```
699
700 - Added support `aggregator_*` for dynamic columns and pseudo columns.
701
702 Pseudo column is a column with `_` prefix.(e.g. `_id`, `_nsubrecs`, ...).
703
704 ### Fixes
705
706 - [CMake] Fixed a build error with CMake when both of msgpack and msgpackc-cxx are installed.
707
708 Please refer the comment of https://github.com/groonga/groonga/pull/1601 about details.
709
710 - Fixed a parse bug when we use `x OR <0.0y` with `QUERY_NO_SYNTAX_ERROR`.
711
712 Records that should match may be not matched.
713
714 For example, if we execute the following query, `{"_key": "name yyy"}` should match but `{"_key": "name yyy"}` is not match.
715
716 ```
717 table_create Names TABLE_PAT_KEY ShortText
718 table_create Tokens TABLE_PAT_KEY ShortText \
719 --default_tokenizer TokenBigram \
720 --normalizer NormalizerAuto
721 column_create Tokens names_key COLUMN_INDEX|WITH_POSITION Names _key
722
723 load --table Names
724 [
725 {"_key": "name yyy"}
726 ]
727
728 select Names \
729 --match_columns "_key" \
730 --query "xxx OR <0.0yyy" \
731 --query_flags ALLOW_PRAGMA|ALLOW_COLUMN|QUERY_NO_SYNTAX_ERROR
732 [
733 [
734 0,
735 0.0,
736 0.0
737 ],
738 [
739 [
740 [
741 0
742 ],
743 [
744 [
745 "_id",
746 "UInt32"
747 ],
748 [
749 "_key",
750 "ShortText"
751 ]
752 ]
753 ]
754 ]
755 ]
756 ```
757
758 - [{doc}`/reference/functions/highlight_html`] Fixed a bug that highlight position may be incorrect.
759
760 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.
761
762 (release-13-0-5)=
763
764 ## Release 13.0.5 - 2023-08-02
765
766 ### Fixes
767
768 - Fixed a bug that index creation may be failed.
769
770 Groonga v13.0.2, v13.0.3, and v13.0.4 have this bug.
771 Therefore, If you already have used the above version, we highly recommend that you use Groonga v13.0.5 or later.
772
773 - [{ref}`query-syntax-near-phrase-search-condition`][{ref}`script-syntax-near-phrase-search-operator`] Fixed a bug that Groonga may crash when we specify invalid syntax query.
774
775 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.
776 (We want to notice that one too many a close parenthesis in the value of "--query" in the following case.)
777
778 ```
779 table_create Entries TABLE_NO_KEY
780 [[0,0.0,0.0],true]
781 column_create Entries content COLUMN_SCALAR Text
782 [[0,0.0,0.0],true]
783 table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenNgram --normalizer NormalizerNFKC121
784 [[0,0.0,0.0],true]
785 column_create Terms entries_content COLUMN_INDEX|WITH_POSITION Entries content
786 [[0,0.0,0.0],true]
787 load --table Entries
788 [
789 {"content": "a b c"}
790 ]
791 [[0,0.0,0.0],1]
792 select Entries --match_columns content --query '*NPP2"(a b))"' --output_columns '_score, content'
793 ```
794
795 (release-13-0-4)=
796
797 ## Release 13.0.4 - 2023-07-26
798
799 ### Improvements
800
801 - [{doc}`/install/windows`] Stopped providing 32-bit packages.
802
803 ### Fixes
804
805 - [{doc}`/install/debian`] [{doc}`/install/ubuntu`] Fixed the default
806 configuration file path for {doc}`/reference/query_expanders/tsv`.
807
808 - [CMake] Fixed a bug that some errors may be reported when CMake 3.16
809 or 3.17 are used.
810
811 (release-13-0-3)=
812
813 ## Release 13.0.3 - 2023-07-24
814
815 ### Improvements
816
817 - [{doc}`/reference/executables/groonga-httpd`] Extracted to
818 [groonga-nginx](https://github.com/groonga/groonga-nginx). We
819 stopped providing the `groonga-httpd` package.
820
821 If you're an user of Debian GNU/Linux 12+ or Ubuntu 23.10+, you can
822 use the `libnginx-mod-http-groonga` package with the default `nginx`
823 package. See [groonga-nginx's
824 README](https://github.com/groonga/groonga-nginx#readme) for
825 details.
826
827 If you're an user of old Debian/Ubuntu or RHEL related
828 distributions, you can't use any `groonga-httpd` equivalent
829 package. You can use
830 {doc}`/reference/executables/groonga-server-http` instead. If
831 {doc}`/reference/executables/groonga-server-http` isn't suitable for
832 your use case, please report it to
833 [Discussions](https://github.com/groonga/groonga/discussions) with
834 your use case.
835
836 - [{doc}`/install/ubuntu`] Added support for Ubuntu 23.10 (Mantic Minotaur).
837
838 - [{doc}`/install/debian`] Enabled xxHash support.
839
840 - [{doc}`/install/ubuntu`] Enabled xxHash support.
841
842 ### Fixes
843
844 - Fixed a bug that the source archive can't be built with CMake.
845
846 (release-13-0-2)=
847
848 ## Release 13.0.2 - 2023-07-12
849
850 ### Improvements
851
852 - [{doc}`/install/ubuntu`] Dropped support for Ubuntu 18.04 (Bionic Beaver).
853
854 - [{doc}`/install/ubuntu`] Added support for Ubuntu 23.04 (Lunar Lobster).
855
856 - [{doc}`/install/debian`] Added support for Debian GNU/Linux 12
857 (bookworm).
858
859 - [Oracle Linux] Dropped support for Oracle Linux. Use
860 {doc}`/install/almalinux` packages instead.
861
862 - [`grn_highlighter`] Added support for changing tag.
863
864 [GH-1453](https://github.com/groonga/groonga/issues/1453)
865 [Reported by askdkc]
866
867 - [`grn_highlighter`] Added support for customizing normalizers.
868
869 - [`grn_highlighter`] Added support for customizing HTML mode.
870
871 - [`grn_highlighter`] Added support for multiple tags.
872
873 - [{doc}`/reference/functions/highlight`] Added
874 the `sequential_class_tag_mode` option.
875
876 - [{doc}`/reference/functions/highlight_html`] Added
877 the `sequential_class_tag_mode` option.
878
879 - [{doc}`/reference/commands/reference_acquire`] Changed to refer
880 index columns that are for the target object when `--recursive dependent`
881 is used.
882
883 If the target object is a column, index columns for the column is
884 also referred.
885
886 If the target object is a table, index columns for the table is also
887 referred.
888
889 If the target object is a DB, all tables are processed as target
890 objects.
891
892 - [CMake] Changed to require CMake 3.16 or later. We'll use CMake
893 instead of GNU Autotools as our recommended build tool in near
894 future and drop support for GNU Autotools eventually.
895
896 - [CMake] Added support for CMake package. You can use it by
897 `find_package(Groonga)`.
898
899 - [Packaging] Changed to use newer GNU Autotools to generate
900 `configure` in the source archive.
901
902 [`ranguba/rroonga#220 <https://github.com/ranguba/rroonga/issues/220>`_]
903 [Reported by ZangRuochen]
904
905 - [{doc}`/reference/commands/reference_acquire`] Optimized reference
906 count implementation for built-in objects.
907
908 - Added support for logging backtrace on `SIGABRT`.
909
910 ### Fixes
911
912 - [{ref}`query-syntax-ordered-near-phrase-product-search-condition`]
913 [{ref}`script-syntax-ordered-near-phrase-product-search-operator`]
914 Fixed a search bug that records that should be matched may not be
915 matched.
916
917 It's happen when multiple 3+ tokens are overlapped in query. For
918 example, `abc` and `abcd` are an invalid combination. If shorter
919 one (`abc`) exists before longer one (`abcd`), this bug is
920 happen. For example, `ONPP1 "(abcd abc) (1 2)"` works but
921 `ONPP1 "(abc abcd) (1 2)"` doesn't work.
922
923 - Fixed a bug that invalid weight may be used with multiple adjusts.
924
925 - [{doc}`/reference/grn_expr/query_syntax`] Fixed a typo.
926
927 [`GH-1560 <https://github.com/groonga/groonga/issues/1560>`_]
928 [Patch by Dylan Golow]
929
930 - [{ref}`query-syntax-near-phrase-search-condition`]
931 [{ref}`script-syntax-near-phrase-search-operator`]
932 [{ref}`query-syntax-near-phrase-product-search-condition`]
933 [{ref}`script-syntax-near-phrase-product-search-operator`]
934 [{ref}`query-syntax-ordered-near-phrase-search-condition`]
935 [{ref}`script-syntax-ordered-near-phrase-search-operator`]
936 [{ref}`query-syntax-ordered-near-phrase-product-search-condition`]
937 [{ref}`script-syntax-ordered-near-phrase-product-search-operator`]
938 Fixed an invalid interval calculation when
939 `additional_last_interval` is used.
940
941 For example, let's think about `*NP3,-1"aaa bbb .$"` against
942 `aaaxxxbbbcdefghi.` In this case, the number of tokens between
943 `aaa` and `bbb` must be 3 but it was 7.
944
945 - [{ref}`query-syntax-near-phrase-product-search-condition`]
946 [{ref}`script-syntax-near-phrase-product-search-operator`]
947 [{ref}`query-syntax-ordered-near-phrase-product-search-condition`]
948 [{ref}`script-syntax-ordered-near-phrase-product-search-operator`]
949 Fixed infinite loop bugs when the same phrase exists in the same
950 phrase group.
951
952 For example, `*NPP1 "(abcd abc abcd bcde) (efghi)"` is a bad query
953 because the first phrase group has two `abcd` phrases.
954
955 For example, `*NPP1 "(abcde \"abc de\") (efghi)"` is a bad query
956 because the first phrase group has `abcde` and `"abc de"`. They
957 are "logically" the same phrases.
958
959 - Fixed a bug that internal lock count may not be decreased when lock
960 acquisition is failed. In normal use-case, this will not be a real
961 problem.
962
963 ### Thanks
964
965 - askdkc
966
967 - Dylan Golow
968
969 - ZangRuochen
970
971 (release-13-0-1)=
972
973 ## Release 13.0.1 - 2023-03-24
974
975 ### Improvements
976
977 - [{doc}`/reference/functions/highlight_html`] Added support for prefix search.
978
979 We can now use prefix search in `highlight_html`.
980
981 Note that highlight keyword is also highlighted not only at the first but also in the middle or at the end.
982
983 ```text
984 table_create Tags TABLE_NO_KEY
985 column_create Tags name COLUMN_SCALAR ShortText
986
987 table_create Terms TABLE_PAT_KEY ShortText \
988 --normalizer 'NormalizerNFKC150'
989 column_create Terms tags_name COLUMN_INDEX Tags name
990
991 load --table Tags
992 [
993 {"name": "Groonga"}
994 ]
995
996 select Tags \
997 --query "name:^g" \
998 --output_columns "highlight_html(name)"
999 # [
1000 # [
1001 # 0,
1002 # 0.0,
1003 # 0.0
1004 # ],
1005 # [
1006 # [
1007 # [
1008 # 1
1009 # ],
1010 # [
1011 # [
1012 # "highlight_html",
1013 # null
1014 # ]
1015 # ],
1016 # [
1017 # "<span class=\"keyword\">G</span>roon<span class=\"keyword\">g</span>a"
1018 # ]
1019 # ]
1020 # ]
1021 # ]
1022 ```
1023
1024 - [{doc}`/reference/normalizers`] Added new options for NormalizerNFKC\*.
1025
1026 - `unify_kana_prolonged_sound_mark`
1027
1028 We can now normalize prolonged_sound_mark with this option as below.
1029
1030 ```text
1031 ァー -> ァア, アー -> アア, ヵー -> ヵア, カー -> カア, ガー -> ガア, サー -> サア, ザー -> ザア,
1032 ター -> タア, ダー -> ダア, ナー -> ナア, ハー -> ハア, バー -> バア, パー -> パア, マー -> マア,
1033 ャー -> ャア, ヤー -> ヤア, ラー -> ラア, ヮー -> ヮア, ワー -> ワア, ヷー -> ヷア,
1034
1035 ィー -> ィイ, イー -> イイ, キー -> キイ, ギー -> ギイ, シー -> シイ, ジー -> ジイ, チー -> チイ,
1036 ヂー -> ヂイ, ニー -> ニイ, ヒー -> ヒイ, ビー -> ビイ, ピー -> ピイ, ミー -> ミイ, リー -> リイ,
1037 ヰー -> ヰイ, ヸー -> ヸイ,
1038
1039 ゥー -> ゥウ, ウー -> ウウ, クー -> クウ, グー -> グウ, スー -> スウ, ズー -> ズウ, ツー -> ツウ,
1040 ヅー -> ヅウ, ヌー -> ヌウ, フー -> フウ, ブー -> ブウ, プー -> プウ, ムー -> ムウ, ュー -> ュウ,
1041 ユー -> ユウ, ルー -> ルウ, ヱー -> ヱウ, ヴー -> ヴウ,
1042
1043 ェー -> ェエ, エー -> エエ, ヶー -> ヶエ, ケー -> ケエ, ゲー -> ゲエ, セー -> セエ, ゼー -> ゼエ,
1044 テー -> テエ, デー -> デエ, ネー -> ネエ, ヘー -> ヘエ, ベー -> ベエ, ペー -> ペエ, メー -> メエ,
1045 レー -> レエ, ヹー -> ヹエ,
1046
1047 ォー -> ォオ, オー -> オオ, コー -> コオ, ゴー -> ゴオ, ソー -> ソオ, ゾー -> ゾオ, トー -> トオ,
1048 ドー -> ドオ, ノー -> ノオ, ホー -> ホオ, ボー -> ボオ, ポー -> ポオ, モー -> モオ, ョー -> ョオ,
1049 ヨー -> ヨオ, ロー -> ロオ, ヲー -> ヲオ, ヺー -> ヺオ,
1050
1051 ンー -> ンン
1052
1053 ぁー -> ぁあ, あー -> ああ, ゕー -> ゕあ, かー -> かあ, がー -> があ, さー -> さあ, ざー -> ざあ,
1054 たー -> たあ, だー -> だあ, なー -> なあ, はー -> はあ, ばー -> ばあ, ぱー -> ぱあ, まー -> まあ,
1055 ゃー -> ゃあ, やー -> やあ, らー -> らあ, ゎー -> ゎあ, わー -> わあ
1056
1057 ぃー -> ぃい, いー -> いい, きー -> きい, ぎー -> ぎい, しー -> しい, じー -> じい, ちー -> ちい,
1058 ぢー -> ぢい, にー -> にい, ひー -> ひい, びー -> びい, ぴー -> ぴい, みー -> みい, りー -> りい,
1059 ゐー -> ゐい
1060
1061 ぅー -> ぅう, うー -> うう, くー -> くう, ぐー -> ぐう, すー -> すう, ずー -> ずう, つー -> つう,
1062 づー -> づう, ぬー -> ぬう, ふー -> ふう, ぶー -> ぶう, ぷー -> ぷう, むー -> むう, ゅー -> ゅう,
1063 ゆー -> ゆう, るー -> るう, ゑー -> ゑう, ゔー -> ゔう
1064
1065 ぇー -> ぇえ, えー -> ええ, ゖー -> ゖえ, けー -> けえ, げー -> げえ, せー -> せえ, ぜー -> ぜえ,
1066 てー -> てえ, でー -> でえ, ねー -> ねえ, へー -> へえ, べー -> べえ, ぺー -> ぺえ, めー -> めえ,
1067 れー -> れえ
1068
1069 ぉー -> ぉお, おー -> おお, こー -> こお, ごー -> ごお, そー -> そお, ぞー -> ぞお, とー -> とお,
1070 どー -> どお, のー -> のお, ほー -> ほお, ぼー -> ぼお, ぽー -> ぽお, もー -> もお, ょー -> ょお,
1071 よー -> よお, ろー -> ろお, をー -> をお
1072
1073 んー -> んん
1074 ```
1075
1076 Here is an example of `unify_kana_prolonged_sound_mark`.
1077
1078 ```text
1079 table_create --name Animals --flags TABLE_HASH_KEY --key_type ShortText
1080 column_create --table Animals --name name --type ShortText
1081 column_create --table Animals --name sound --type ShortText
1082 load --table Animals
1083 [
1084 {"_key":"1","name":"羊", "sound":"メーメー"},
1085 ]
1086
1087 table_create \
1088 --name idx_animals_sound \
1089 --flags TABLE_PAT_KEY \
1090 --key_type ShortText \
1091 --default_tokenizer TokenBigram \
1092 --normalizer 'NormalizerNFKC150("unify_kana_prolonged_sound_mark", true)'
1093 column_create --table idx_animals_sound --name animals_sound --flags COLUMN_INDEX|WITH_POSITION --type Animals --source sound
1094
1095 select --table Animals --query sound:@メエメエ
1096 # [
1097 # [
1098 # 0,
1099 # 1677829950.652696,
1100 # 0.01971983909606934
1101 # ],
1102 # [
1103 # [
1104 # [
1105 # 1
1106 # ],
1107 # [
1108 # [
1109 # "_id",
1110 # "UInt32"
1111 # ],
1112 # [
1113 # "_key",
1114 # "ShortText"
1115 # ],
1116 # [
1117 # "name",
1118 # "ShortText"
1119 # ],
1120 # [
1121 # "sound",
1122 # "ShortText"
1123 # ]
1124 # ],
1125 # [
1126 # 1,
1127 # "1",
1128 # "羊",
1129 # "メーメー"
1130 # ]
1131 # ]
1132 # ]
1133 # ]
1134 ```
1135
1136 - `unify_kana_hyphen`
1137
1138 We can now normalize hyphen with this option as below.
1139
1140 ```text
1141 ァ- -> ァア, ア- -> アア, ヵ- -> ヵア, カ- -> カア, ガ- -> ガア, サ- -> サア, ザ- -> ザア,
1142 タ- -> タア, ダ- -> ダア, ナ- -> ナア, ハ- -> ハア, バ- -> バア, パ- -> パア, マ- -> マア,
1143 ャ- -> ャア, ヤ- -> ヤア, ラ- -> ラア, ヮ- -> ヮア, ワ- -> ワア, ヷ- -> ヷア,
1144
1145 ィ- -> ィイ, イ- -> イイ, キ- -> キイ, ギ- -> ギイ, シ- -> シイ, ジ- -> ジイ, チ- -> チイ,
1146 ヂ- -> ヂイ, ニ- -> ニイ, ヒ- -> ヒイ, ビ- -> ビイ, ピ- -> ピイ, ミ- -> ミイ, リ- -> リイ,
1147 ヰ- -> ヰイ, ヸ- -> ヸイ,
1148
1149 ゥ- -> ゥウ, ウ- -> ウウ, ク- -> クウ, グ- -> グウ, ス- -> スウ, ズ- -> ズウ, ツ- -> ツウ,
1150 ヅ- -> ヅウ, ヌ- -> ヌウ, フ- -> フウ, ブ- -> ブウ, プ- -> プウ, ム- -> ムウ, ュ- -> ュウ,
1151 ユ- -> ユウ, ル- -> ルウ, ヱ- -> ヱウ, ヴ- -> ヴウ,
1152
1153 ェ- -> ェエ, エ- -> エエ, ヶ- -> ヶエ, ケ- -> ケエ, ゲ- -> ゲエ, セ- -> セエ, ゼ- -> ゼエ,
1154 テ- -> テエ, デ- -> デエ, ネ- -> ネエ, ヘ- -> ヘエ, ベ- -> ベエ, ペ- -> ペエ, メ- -> メエ,
1155 レ- -> レエ, ヹ- -> ヹエ,
1156
1157 ォ- -> ォオ, オ- -> オオ, コ- -> コオ, ゴ- -> ゴオ, ソ- -> ソオ, ゾ- -> ゾオ, ト- -> トオ,
1158 ド- -> ドオ, ノ- -> ノオ, ホ- -> ホオ, ボ- -> ボオ, ポ- -> ポオ, モ- -> モオ, ョ- -> ョオ,
1159 ヨ- -> ヨオ, ロ- -> ロオ, ヲ- -> ヲオ, ヺ- -> ヺオ,
1160
1161 ン- -> ンン
1162
1163 ぁ- -> ぁあ, あ- -> ああ, ゕ- -> ゕあ, か- -> かあ, が- -> があ, さ- -> さあ, ざ- -> ざあ,
1164 た- -> たあ, だ- -> だあ, な- -> なあ, は- -> はあ, ば- -> ばあ, ぱ- -> ぱあ, ま- -> まあ,
1165 ゃ- -> ゃあ, や- -> やあ, ら- -> らあ, ゎ- -> ゎあ, わ- -> わあ
1166
1167 ぃ- -> ぃい, い- -> いい, き- -> きい, ぎ- -> ぎい, し- -> しい, じ- -> じい, ち- -> ちい,
1168 ぢ- -> ぢい, に- -> にい, ひ- -> ひい, び- -> びい, ぴ- -> ぴい, み- -> みい, り- -> りい,
1169 ゐ- -> ゐい
1170
1171 ぅ- -> ぅう, う- -> うう, く- -> くう, ぐ- -> ぐう, す- -> すう, ず- -> ずう, つ- -> つう,
1172 づ- -> づう, ぬ- -> ぬう, ふ- -> ふう, ぶ- -> ぶう, ぷ- -> ぷう, む- -> むう, ゅ- -> ゅう,
1173 ゆ- -> ゆう, る- -> るう, ゑ- -> ゑう, ゔ- -> ゔう
1174
1175 ぇ- -> ぇえ, え- -> ええ, ゖ- -> ゖえ, け- -> けえ, げ- -> げえ, せ- -> せえ, ぜ- -> ぜえ,
1176 て- -> てえ, で- -> でえ, ね- -> ねえ, へ- -> へえ, べ- -> べえ, ぺ- -> ぺえ, め- -> めえ,
1177 れ- -> れえ
1178
1179 ぉ- -> ぉお, お- -> おお, こ- -> こお, ご- -> ごお, そ- -> そお, ぞ- -> ぞお, と- -> とお,
1180 ど- -> どお, の- -> のお, ほ- -> ほお, ぼ- -> ぼお, ぽ- -> ぽお, も- -> もお, ょ- -> ょお,
1181 よ- -> よお, ろ- -> ろお, を- -> をお
1182
1183 ん- -> んん
1184 ```
1185
1186 Here is an example of `unify_kana_hyphen`.
1187
1188 ```text
1189 table_create --name Animals --flags TABLE_HASH_KEY --key_type ShortText
1190 column_create --table Animals --name name --type ShortText
1191 column_create --table Animals --name sound --type ShortText
1192 load --table Animals
1193 [
1194 {"_key":"1","name":"羊", "sound":"メ-メ-"},
1195 ]
1196
1197 table_create \
1198 --name idx_animals_sound \
1199 --flags TABLE_PAT_KEY \
1200 --key_type ShortText \
1201 --default_tokenizer TokenBigram \
1202 --normalizer 'NormalizerNFKC150("unify_kana_hyphen", true)'
1203 column_create --table idx_animals_sound --name animals_sound --flags COLUMN_INDEX|WITH_POSITION --type Animals --source sound
1204
1205 select --table Animals --query sound:@メエメエ
1206 # [
1207 # [
1208 # 0,1677829950.652696,
1209 # 0.01971983909606934
1210 # ],
1211 # [
1212 # [
1213 # [
1214 # 1
1215 # ],
1216 # [
1217 # [
1218 # "_id",
1219 # "UInt32"
1220 # ],
1221 # [
1222 # "_key",
1223 # "ShortText"
1224 # ],
1225 # [
1226 # "name",
1227 # "ShortText"
1228 # ],
1229 # [
1230 # "sound",
1231 # "ShortText"
1232 # ]
1233 # ],
1234 # [
1235 # 1,
1236 # "1",
1237 # "羊",
1238 # "メ-メ-"
1239 # ]
1240 # ]
1241 # ]
1242 # ]
1243 ```
1244
1245 - [{ref}`query-syntax-near-search-condition`][{ref}`script-syntax-near-search-operator`]
1246 Added a new option `${MIN_INTERVAL}` for near-search family.
1247
1248 We can now specify the minimum interval between phrases (words) with `${MIN_INTERVAL}`.
1249 The interval between phrases (words) must be at least this value.
1250
1251 Here are new syntax:
1252
1253 ```text
1254 *N${MAX_INTERVAL},${MAX_TOKEN_INTERVAL_1}|${MAX_TOKEN_INTERVAL_2}|...,${MIN_INTERVAL} "word1 word2 ..."
1255 *NP${MAX_INTERVAL},${ADDITIONAL_LAST_INTERVAL},${MAX_PHRASE_INTERVAL_1}|${MAX_PHRASE_INTERVAL_2}|...,${MIN_INTERVAL} "phrase1 phrase2 ..."
1256 *NPP${MAX_INTERVAL},${ADDITIONAL_LAST_INTERVAL},${MAX_PHRASE_INTERVAL_1}|${MAX_PHRASE_INTERVAL_2}|...,${MIN_INTERVAL} "(phrase1-1 phrase1-2 ...) (phrase2-1 phrase2-2 ...) ..."
1257 *ONP${MAX_INTERVAL},${ADDITIONAL_LAST_INTERVAL},${MAX_PHRASE_INTERVAL_1}|${MAX_PHRASE_INTERVAL_2}|...,${MIN_INTERVAL} "phrase1 phrase2 ..."
1258 *ONPP${MAX_INTERVAL},${ADDITIONAL_LAST_INTERVAL},${MAX_PHRASE_INTERVAL_1}|${MAX_PHRASE_INTERVAL_2}|...,${MIN_INTERVAL} "(phrase1-1 phrase1-2 ...) (phrase2-1 phrase2-2 ...) ..."
1259 ```
1260
1261 The default value of `${MIN_INTERVAL}` is `INT32_MIN` (`-2147483648`).
1262 We use the default value when `${MIN_INTERVAL}` is omitted.
1263
1264 This option is useful when we want to ignore overlapped phrases.
1265
1266 The interval for `*NP` is culculated as `interval between the top tokens of phrases - tokens in the left phrase + 1`.
1267
1268 When a tokenizer is Bigram, for exmaple, `東京` has one token `東京`, also `京都` has one token `京都`.
1269
1270 Considering `東京都` as a target value of `*NP "東京 京都"`:
1271
1272 - `interval between the top tokens of phrases`: `1` (interval between `東京` and `京都`)
1273 - `tokens in the left phrase`: `1` ( `東京` )
1274
1275 The interval for `*NP` of `東京都` is `1 - 1 + 1` = `1`.
1276
1277 As a result, the interval for `*NP` is greater than `1` when `東京` and `京都` are not overlapped.
1278
1279 Here is an example for ignoring overlapped phrases.
1280
1281 ```text
1282 table_create Entries TABLE_NO_KEY
1283 column_create Entries content COLUMN_SCALAR Text
1284
1285 table_create Terms TABLE_PAT_KEY ShortText \
1286 --default_tokenizer 'TokenNgram("unify_alphabet", false, \
1287 "unify_digit", false)' \
1288 --normalizer NormalizerNFKC150
1289 column_create Terms entries_content COLUMN_INDEX|WITH_POSITION Entries content
1290
1291 load --table Entries
1292 [
1293 {"content": "東京都"},
1294 {"content": "東京京都"}
1295 ]
1296
1297 select Entries \
1298 --match_columns content \
1299 --query '*NP-1,0,,2"東京 京都"' \
1300 --output_columns '_score, content'
1301 # [
1302 # [
1303 # 0,
1304 # 0.0,
1305 # 0.0
1306 # ],
1307 # [
1308 # [
1309 # [
1310 # 1
1311 # ],
1312 # [
1313 # [
1314 # "_score",
1315 # "Int32"
1316 # ],
1317 # [
1318 # "content",
1319 # "Text"
1320 # ]
1321 # ],
1322 # [
1323 # 1,
1324 # "東京京都"
1325 # ]
1326 # ]
1327 # ]
1328 # ]
1329 ```
1330
1331 In the example above, `東京都` is not matched as the interval is `1`
1332 but `東京京都` is matched as the interval is `2`.
1333
1334 - [{doc}`/reference/normalizers`] Added support for new values in the `unify_katakana_trailing_o` option.
1335
1336 We added support for normalizing the following new values in the `unify_katakana_trailing_o` option
1337 because a vowel of those left letters is `O`.
1338
1339 - `ォオ` -> `ォウ`
1340 - `ョオ` -> `ョウ`
1341 - `ヺオ` -> `ヺウ`
1342
1343 - Add support for MessagePack v6.0.0. [GitHub#1536][Reported by Carlo Cabrera]
1344
1345 Groonga can not found MessagePack v6.0.0 or later when we execute configure or cmake until now.
1346 Groonga can found MessagePack since this release even if the version of MessagePack is v6.0.0 or later.
1347
1348 ### Fixes
1349
1350 - [{doc}`/reference/normalizers`] Fixed a bug that NormalizerNFKC\* did incorrect normalization.
1351
1352 This bug occured when `unify_kana_case` and `unify_katakana_v_sounds` used at the same time.
1353
1354 For example, `ヴァ` was normalized to `バア` with `unify_kana_case` and `unify_katakana_v_sounds`,
1355 but `ヴァ` should be normalized to `バ`.
1356
1357 This was because `ヴァ` was normalized to `ヴア` with `unify_kana_case`, and after that, `ヴア` was normalized
1358 to `バア` with `unify_katakana_v_sounds`. We fixed to normalize characters with `unify_katakana_v_sounds` before
1359 `unify_kana_case`.
1360
1361 Here is an example of the bug in the previous version.
1362
1363 ```text
1364 normalize \
1365 'NormalizerNFKC150("unify_katakana_v_sounds", true, \
1366 "unify_kana_case", true)' \
1367 "ヴァーチャル"
1368 #[
1369 # [
1370 # 0,
1371 # 1678097412.913053,
1372 # 0.00019073486328125
1373 # ],
1374 # {
1375 # "normalized":"ブアーチヤル",
1376 # "types":[],
1377 # "checks":[]
1378 # }
1379 #]
1380 ```
1381
1382 From this version, `ヴァーチャル` is normalized to `バーチヤル`.
1383
1384 - [{ref}`query-syntax-ordered-near-phrase-search-condition`][{ref}`script-syntax-ordered-near-phrase-search-operator`]
1385 Fixed a bug that `${MAX_PHRASE_INTERVALS}` doesn't work correctly.
1386
1387 When this bug occured, intervals are regarded as `0`.
1388 Therefore, if this bug occurs, records may hit too many.
1389
1390 This bug occured when:
1391
1392 1. Use `*ONP` with `${MAX_PHRASE_INTERVALS}`
1393 2. The number of tokens in the matched left phrase is greater than or equal to the number of `${MAX_PHRASE_INTERVALS}` elements.
1394
1395 Here is an example of this bug.
1396
1397 ```text
1398 table_create Entries TABLE_NO_KEY
1399 column_create Entries content COLUMN_SCALAR Text
1400 table_create Terms TABLE_PAT_KEY ShortText \
1401 --default_tokenizer 'TokenNgram("unify_alphabet", false, \
1402 "unify_digit", false)' \
1403 --normalizer NormalizerNFKC150
1404 column_create Terms entries_content COLUMN_INDEX|WITH_POSITION Entries content
1405 load --table Entries
1406 [
1407 {"content": "abcXYZdef"},
1408 {"content": "abcdef"},
1409 {"content": "abc123456789def"},
1410 {"content": "abc12345678def"},
1411 {"content": "abc1de2def"}
1412 ]
1413 select Entries --filter 'content *ONP-1,0,1 "abc def"' --output_columns '_score, content'
1414 #[
1415 # [
1416 # 0,
1417 # 0.0,
1418 # 0.0
1419 # ],
1420 # [
1421 # [
1422 # [
1423 # 5
1424 # ],
1425 # [
1426 # [
1427 # "_score",
1428 # "Int32"
1429 # ],
1430 # [
1431 # "content",
1432 # "Text"
1433 # ]
1434 # ],
1435 # [
1436 # 1,
1437 # "abcXYZdef"
1438 # ],
1439 # [
1440 # 1,
1441 # "abcdef"
1442 # ],
1443 # [
1444 # 1,
1445 # "abc123456789def"
1446 # ],
1447 # [
1448 # 1,
1449 # "abc12345678def"
1450 # ],
1451 # [
1452 # 1,
1453 # "abc1de2def"
1454 # ]
1455 # ]
1456 # ]
1457 #]
1458 ```
1459
1460 In the example above, the first element interval is specified as `1` with `*ONP-1,0,1 "abc def"`,
1461 but all `content` is matched, including those farther than `1`.
1462
1463 This is because the example satisfies the condition for the bug and the interval is regarded as `0`.
1464
1465 1. Use `*ONP` with `${MAX_PHRASE_INTERVALS}`
1466
1467 `*ONP-1,0,1 "abc def"` specifies `${MAX_PHRASE_INTERVALS}`.
1468
1469 2. The number of tokens in the matched left phrase is greater than or equal to the number of `${MAX_PHRASE_INTERVALS}` elements.
1470
1471 - The matched left phrase: `abc`
1472
1473 - Included tokens: `ab`, `bc`
1474 - Tokenized with `TokenNgram("unify_alphabet", false, "unify_digit", false)`
1475
1476 - The number of elements specified with `max_element_intervals`: `1`
1477
1478 - `1` of `*ONP-1,0,1 "abc def"`
1479
1480 - The number of tokens in the left phrase (`2`) > the number of elements specified with `max_element_intervals` (`1`)
1481
1482 - [{ref}`query-syntax-near-phrase-search-condition`][{ref}`script-syntax-near-phrase-search-operator`]
1483 Fixed a bug that phrases specified as last didn't used as last in near-phrase family.
1484
1485 When this bug occured, `${ADDITIONAL_LAST_INTERVAL}` was ignored and only `${MAX_INTERVAL}` was used.
1486
1487 This bug occured when:
1488
1489 1. A phrase specified as last contains multiple tokens.
1490 2. The size of the last token of the phrase is smaller than or equals to the sizes of other tokens in the phrase.
1491
1492 - The token size is the number of tokens appeared in the all records.
1493
1494 Here is an example of this bug.
1495
1496 ```text
1497 table_create Entries TABLE_NO_KEY
1498 column_create Entries content COLUMN_SCALAR Text
1499
1500 table_create Terms TABLE_PAT_KEY ShortText \
1501 --default_tokenizer 'TokenNgram("unify_alphabet", false, \
1502 "unify_digit", false)' \
1503 --normalizer NormalizerNFKC150
1504 column_create Terms entries_content COLUMN_INDEX|WITH_POSITION Entries content
1505
1506 load --table Entries
1507 [
1508 {"content": "abc123456789defg"},
1509 {"content": "dededede"}
1510 ]
1511
1512 select Entries \
1513 --filter 'content *NP10,1"abc defg$"' \
1514 --output_columns '_score, content'
1515 #[
1516 # [
1517 # 0,
1518 # 0.0,
1519 # 0.0
1520 # ],
1521 # [
1522 # [
1523 # [
1524 # 0
1525 # ],
1526 # [
1527 # [
1528 # "_score",
1529 # "Int32"
1530 # ],
1531 # [
1532 # "content",
1533 # "Text"
1534 # ]
1535 # ]
1536 # ]
1537 # ]
1538 #]
1539 ```
1540
1541 In the example above, for `abc123456789defg`, the interval `abc` to `defg` is `11`.
1542 `${MAX_INTERVAL}` is `10` and `${ADDITIONAL_LAST_INTERVAL}` is `1`, so a threshold for matching last phrase is `11`.
1543 So it should be matched, but isn't.
1544
1545 This is because the example satisfies the condition for the bug as below, and only ``${MAX_INTERVAL}` is used.
1546
1547 1. A phrase specified as last contains multiple tokens.
1548
1549 `defg$` is specified as last because the suffix is `$`.
1550
1551 `defg$` is tokenized to `de`, `ef`, `fg` with `TokenNgram("unify_alphabet", false, "unify_digit", false)`
1552
1553 2. The size of the last token of the phrase is smaller than or equals to the sizes of other tokens in the phrase.
1554
1555 `fg` is the last token of `defg$`. `abc123456789defg` contains one `fg` and `de`, and `dededede` contains 4 `de`.
1556
1557 So, the size of `fg` is 1 and `de` is 5.
1558
1559 - [{ref}`query-syntax-near-phrase-search-condition`] Fixed interval calculation.
1560
1561 If we use near phrase search, records may hit too many by this bug.
1562
1563 - [{doc}`/reference/functions/highlight_html`] Fixed a bug that highlight position may move over when we use `loose_symbol=true`.
1564
1565 ### Thanks
1566
1567 - Carlo Cabrera
1568
1569 (release-13-0-0)=
1570
1571 ## Release 13.0.0 - 2023-02-09
1572
1573 This is a major version up!
1574 But It keeps backward compatibility. We can upgrade to 13.0.0 without rebuilding database.
1575
1576 First of all, we introduce the main changes in 13.0.0.
1577 Then, we introduce the hilight and summary of changes from Groonga 12.0.0 to 12.1.2.
1578
1579 ### Improvements
1580
1581 - [{doc}`/reference/normalizers`] Added a new Normalizer `NormalizerNFKC150` based on Unicode NFKC (Normalization Form Compatibility Composition) for Unicode 15.0.
1582
1583 - [{doc}`/reference/token_filters`] Added a new TokenFilter `TokenFilterNFKC150` based on Unicode NFKC (Normalization Form Compatibility Composition) for Unicode 15.0.
1584
1585 - [{doc}`/reference/normalizers/normalizer_nfkc150`] Added new options for NormalizerNFKC\* as below.
1586
1587 - `unify_katakana_gu_small_sounds`
1588
1589 We can normalize "グァ -> ガ", "グィ -> ギ", "グェ -> ゲ", and "グォ -> ゴ" with this option.
1590
1591 Here is an example of `unify_katakana_gu_small_sounds` option.
1592
1593 ```text
1594 table_create --name Countries --flags TABLE_HASH_KEY --key_type ShortText
1595 column_create --table Countries --name name --type ShortText
1596 load --table Countries
1597 [
1598 {"_key":"JP","name":"日本"},
1599 {"_key":"GT","name":"グァテマラ共和国"},
1600 ]
1601
1602 table_create \
1603 --name idx_contry_name \
1604 --flags TABLE_PAT_KEY \
1605 --key_type ShortText \
1606 --default_tokenizer TokenBigram \
1607 --normalizer 'NormalizerNFKC150("unify_katakana_gu_small_sounds", true)'
1608 column_create --table idx_contry_name --name contry_name --flags COLUMN_INDEX|WITH_POSITION --type Countries --source name
1609
1610 select --table Countries --query name:@ガテマラ共和国
1611 # [
1612 # [0,
1613 # 0,
1614 # 0
1615 # ],
1616 # [
1617 # [
1618 # [
1619 # 1
1620 # ],
1621 # [
1622 # [
1623 # "_id",
1624 # "UInt32"
1625 # ],
1626 # [
1627 # "_key",
1628 # "ShortText"
1629 # ],
1630 # [
1631 # "name",
1632 # "ShortText"
1633 # ]
1634 # ],
1635 # [
1636 # 2,
1637 # "GT",
1638 # "グァテマラ共和国"
1639 # ]
1640 # ]
1641 # ]
1642 # ]
1643 ```
1644
1645 - `unify_katakana_di_sound`
1646
1647 We can normalize "ヂ -> ジ" with this option.
1648
1649 Here is an example of `unify_katakana_di_sound` option.
1650
1651 ```text
1652 table_create --name Foods --flags TABLE_HASH_KEY --key_type ShortText
1653 column_create --table Foods --name name --type ShortText
1654 load --table Foods
1655 [
1656 {"_key":"1","name":"チジミ"},
1657 {"_key":"2","name":"パジョン"},
1658 ]
1659
1660 table_create \
1661 --name idx_food_name \
1662 --flags TABLE_PAT_KEY \
1663 --key_type ShortText \
1664 --default_tokenizer TokenBigram \
1665 --normalizer 'NormalizerNFKC150("unify_katakana_di_sound", true)'
1666 column_create --table idx_food_name --name food_name --flags COLUMN_INDEX|WITH_POSITION --type Foods --source name
1667
1668 select --table Foods --query name:@チヂミ
1669 # [
1670 # [
1671 # 0,
1672 # 0,
1673 # 0
1674 # ],
1675 # [
1676 # [
1677 # [
1678 # 1
1679 # ],
1680 # [
1681 # [
1682 # "_id",
1683 # "UInt32"
1684 # ],
1685 # [
1686 # "_key",
1687 # "ShortText"
1688 # ],
1689 # [
1690 # "name",
1691 # "ShortText"
1692 # ]
1693 # ],
1694 # [
1695 # 1,
1696 # "1",
1697 # "チジミ"
1698 # ]
1699 # ]
1700 # ]
1701 # ]
1702 ```
1703
1704 - `unify_katakana_wo_sound`
1705
1706 We can normalize "ヲ -> オ" with this option.
1707
1708 Here is an example of `unify_katakana_wo_sound` option.
1709
1710 ```text
1711 table_create --name Foods --flags TABLE_HASH_KEY --key_type ShortText
1712 column_create --table Foods --name name --type ShortText
1713 load --table Foods
1714 [
1715 {"_key":"1","name":"アヲハタ"},
1716 {"_key":"2","name":"ヴェルデ"},
1717 {"_key":"3","name":"ランプ"},
1718 ]
1719
1720 table_create \
1721 --name idx_food_name \
1722 --flags TABLE_PAT_KEY \
1723 --key_type ShortText \
1724 --default_tokenizer TokenBigram \
1725 --normalizer 'NormalizerNFKC150("unify_katakana_wo_sound", true)'
1726 column_create --table idx_food_name --name food_name --flags COLUMN_INDEX|WITH_POSITION --type Foods --source name
1727
1728 select --table Foods --query name:@アオハタ
1729 # [
1730 # [
1731 # 0,
1732 # 0,
1733 # 0
1734 # ],
1735 # [
1736 # [
1737 # [
1738 # 1
1739 # ],
1740 # [
1741 # [
1742 # "_id",
1743 # "UInt32"
1744 # ],
1745 # [
1746 # "_key",
1747 # "ShortText"
1748 # ],
1749 # [
1750 # "name",
1751 # "ShortText"
1752 # ]
1753 # ],
1754 # [
1755 # 1,
1756 # "1",
1757 # "アヲハタ"
1758 # ]
1759 # ]
1760 # ]
1761 # ]
1762 ```
1763
1764 - `unify_katakana_zu_small_sounds`
1765
1766 We can normalize "ズァ -> ザ", "ズィ -> ジ", "ズェ -> ゼ", and "ズォ -> ゾ" with this option.
1767
1768 Here is an example of `unify_katakana_zu_small_sounds` option.
1769
1770 ```text
1771 table_create --name Cities --flags TABLE_HASH_KEY --key_type ShortText
1772 column_create --table Cities --name name --type ShortText
1773 load --table Cities
1774 [
1775 {"_key":"1","name":"ガージヤーバード"},
1776 {"_key":"2","name":"デリー"},
1777 ]
1778
1779 table_create \
1780 --name idx_city_name \
1781 --flags TABLE_PAT_KEY \
1782 --key_type ShortText \
1783 --default_tokenizer TokenBigram \
1784 --normalizer 'NormalizerNFKC150("unify_katakana_zu_small_sounds", true)'
1785 column_create --table idx_city_name --name city_name --flags COLUMN_INDEX|WITH_POSITION --type Cities --source name
1786
1787 select --table Cities --query name:@ガーズィヤーバード
1788 # [
1789 # [
1790 # 0,
1791 # 0,
1792 # 0
1793 # ],
1794 # [
1795 # [
1796 # [
1797 # 1
1798 # ],
1799 # [
1800 # [
1801 # "_id",
1802 # "UInt32"
1803 # ],
1804 # [
1805 # "_key",
1806 # "ShortText"
1807 # ],
1808 # [
1809 # "name",
1810 # "ShortText"
1811 # ]
1812 # ],
1813 # [
1814 # 1,
1815 # "1",
1816 # "ガージヤーバード"
1817 # ]
1818 # ]
1819 # ]
1820 # ]
1821 ```
1822
1823 - `unify_katakana_du_sound`
1824
1825 We can normalize "ヅ -> ズ" with this option.
1826
1827 Here is an example of `unify_katakana_du_sound` option.
1828
1829 ```text
1830 table_create --name Plants --flags TABLE_HASH_KEY --key_type ShortText
1831 column_create --table Plants --name name --type ShortText
1832 load --table Plants
1833 [
1834 {"_key":"1","name":"ハスノカヅラ"},
1835 {"_key":"2","name":"オオツヅラフジ"},
1836 {"_key":"3","name":"アオツヅラフジ"},
1837 ]
1838
1839 table_create \
1840 --name idx_plant_name \
1841 --flags TABLE_PAT_KEY \
1842 --key_type ShortText \
1843 --default_tokenizer TokenBigram \
1844 --normalizer 'NormalizerNFKC150("unify_katakana_du_sound", true)'
1845 column_create --table idx_plant_name --name plant_name --flags COLUMN_INDEX|WITH_POSITION --type Plants --source name
1846
1847 select --table Plants --query name:@ツズラ
1848 # [
1849 # [
1850 # 0,
1851 # 0,
1852 # 0
1853 # ],
1854 # [
1855 # [
1856 # [
1857 # 2
1858 # ],
1859 # [
1860 # [
1861 # "_id",
1862 # "UInt32"
1863 # ],
1864 # [
1865 # "_key",
1866 # "ShortText"
1867 # ],
1868 # [
1869 # "name",
1870 # "ShortText"
1871 # ]
1872 # ],
1873 # [
1874 # 2,
1875 # "2",
1876 # "オオツヅラフジ"
1877 # ],
1878 # [
1879 # 3,
1880 # "3",
1881 # "アオツヅラフジ"
1882 # ]
1883 # ]
1884 # ]
1885 # ]
1886 ```
1887
1888 - `unify_katakana_trailing_o`
1889
1890 We can normalize following characters with this option.
1891
1892 - "オオ -> オウ"
1893 - "コオ -> コウ"
1894 - "ソオ -> ソウ"
1895 - "トオ -> トウ"
1896 - "ノオ -> ノウ"
1897 - "ホオ -> ホウ"
1898 - "モオ -> モウ"
1899 - "ヨオ -> ヨウ"
1900 - "ロオ -> ロウ"
1901 - "ゴオ -> ゴウ"
1902 - "ゾオ -> ゾウ"
1903 - "ドオ -> ドウ"
1904 - "ボオ -> ボウ"
1905 - "ポオ -> ポウ"
1906
1907 Here is an example of `unify_katakana_trailing_o` option.
1908
1909 ```text
1910 table_create --name Sharks --flags TABLE_HASH_KEY --key_type ShortText
1911 column_create --table Sharks --name name --type ShortText
1912 load --table Sharks
1913 [
1914 {"_key":"1","name":"ホオジロザメ"},
1915 {"_key":"2","name":"ジンベイザメ"},
1916 ]
1917
1918 table_create \
1919 --name idx_shark_name \
1920 --flags TABLE_PAT_KEY \
1921 --key_type ShortText \
1922 --default_tokenizer TokenBigram \
1923 --normalizer 'NormalizerNFKC150("unify_katakana_trailing_o", true)'
1924 column_create --table idx_shark_name --name shark_name --flags COLUMN_INDEX|WITH_POSITION --type Sharks --source name
1925
1926 select --table Sharks --query name:@ホウジロザメ
1927 # [
1928 # [
1929 # 0,
1930 # 0,
1931 # 0
1932 # ],
1933 # [
1934 # [
1935 # [
1936 # 1
1937 # ],
1938 # [
1939 # [
1940 # "_id",
1941 # "UInt32"
1942 # ],
1943 # [
1944 # "_key",
1945 # "ShortText"
1946 # ],
1947 # [
1948 # "name",
1949 # "ShortText"
1950 # ]
1951 # ],
1952 # [
1953 # 1,
1954 # "1",
1955 # "ホオジロザメ"
1956 # ]
1957 # ]
1958 # ]
1959 # ]
1960 ```
1961
1962 - `unify_katakana_du_small_sounds`
1963
1964 We can normalize "ヅァ -> ザ", "ヅィ -> ジ", "ヅェ -> ゼ", and "ヅォ -> ゾ" with this option.
1965
1966 Here is an example of `unify_katakana_du_small_sounds` option.
1967
1968 ```text
1969 table_create --name Airports --flags TABLE_HASH_KEY --key_type ShortText
1970 column_create --table Airports --name name --type ShortText
1971 load --table Airports
1972 [
1973 {"_key":"HER","name":"イラクリオ・ニコスカザンヅァキス国際空港"},
1974 {"_key":"ATH","name":"アテネ国際空港"},
1975 ]
1976
1977 table_create \
1978 --name idx_airport_name \
1979 --flags TABLE_PAT_KEY \
1980 --key_type ShortText \
1981 --default_tokenizer TokenBigram \
1982 --normalizer 'NormalizerNFKC150("unify_katakana_du_small_sounds", true)'
1983 column_create --table idx_airport_name --name airport_name --flags COLUMN_INDEX|WITH_POSITION --type Airports --source name
1984
1985 select --table Airports --query name:@ニコスカザンザキス
1986 # [
1987 # [
1988 # [
1989 # 1
1990 # ],
1991 # [
1992 # [
1993 # "_id",
1994 # "UInt32"
1995 # ],
1996 # [
1997 # "_key",
1998 # "ShortText"
1999 # ],
2000 # [
2001 # "name",
2002 # "ShortText"
2003 # ]
2004 # ],
2005 # [
2006 # 1,
2007 # "HER",
2008 # "イラクリオ・ニコスカザンヅァキス国際空港"
2009 # ]
2010 # ]
2011 # ]
2012 ```
2013
2014 - [Oracle Linux] Added newly support for Oracle Linux 8 and 9.
2015
2016 ### Thanks
2017
2018 - Atsushi Shinoda
2019 - i10a
2020 - naoa
2021 - shinonon
2022 - Zhanzhao (Deo) Liang
2023 - David CARLIER
2024
2025 ### Higlight and Summary of changes from 12.0.0 to 12.1.2
2026
2027 #### Higlight
2028
2029 [{ref}`release-12-0-9`]
2030
2031 - [{doc}`/reference/normalizers`] Added `NormalizerHTML`. (Experimental)
2032
2033 `NormalizerHTML` is a normalizer for HTML.
2034
2035 Currently `NormalizerHTML` supports removing tags like `<span>` or `</span>` and expanding character references like `&amp;` or `&#38;`.
2036
2037 Here are sample queries for `NormalizerHTML`.
2038
2039 ```text
2040 normalize NormalizerHTML "<span> Groonga &amp; Mroonga &#38; Rroonga </span>"
2041 # [[0,1666923364.883798,0.0005481243133544922],{"normalized":" Groonga & Mroonga & Rroonga ","types":[],"checks":[]}]
2042 ```
2043
2044 In this sample `<span>` and `</span>` are removed, and `&amp;` and `&#38;` are expanded to `&`.
2045
2046 We can specify whether removing the tags with the `remove_tag` option.
2047 (The default value of the `remove_tag` option is `true`.)
2048
2049 ```text
2050 normalize 'NormalizerHTML("remove_tag", false)' "<span> Groonga &amp; Mroonga &#38; Rroonga </span>"
2051 # [[0,1666924069.278549,0.0001978874206542969],{"normalized":"<span> Groonga & Mroonga & Rroonga </span>","types":[],"checks":[]}]
2052 ```
2053
2054 In this sample, `<span>` and `</span>` are not removed.
2055
2056 We can specify whether expanding the character references with the `expand_character_reference` option.
2057 (The default value of the `expand_character_reference` option is `true`.)
2058
2059 ```text
2060 normalize 'NormalizerHTML("expand_character_reference", false)' "<span> Groonga &amp; Mroonga &#38; Rroonga </span>"
2061 # [[0,1666924357.099782,0.0002346038818359375],{"normalized":" Groonga &amp; Mroonga &#38; Rroonga ","types":[],"checks":[]}]
2062 ```
2063
2064 In this sample, `&amp;` and `&#38;` are not expanded.
2065
2066 [{ref}`release-12-0-3`]
2067
2068 - [{doc}`/reference/functions/snippet`],[{doc}`/reference/functions/snippet_html`] Added support for text vector as input. [groonga-dev,04956][Reported by shinonon]
2069
2070 For example, we can extract snippets of target text around search keywords against vector in JSON data as below.
2071
2072 ```text
2073 table_create Entries TABLE_NO_KEY
2074 column_create Entries title COLUMN_SCALAR ShortText
2075 column_create Entries contents COLUMN_VECTOR ShortText
2076
2077 table_create Tokens TABLE_PAT_KEY ShortText --default_tokenizer TokenNgram --normalizer NormalizerNFKC130
2078 column_create Tokens entries_title COLUMN_INDEX|WITH_POSITION Entries title
2079 column_create Tokens entries_contents COLUMN_INDEX|WITH_SECTION|WITH_POSITION Entries contents
2080
2081 load --table Entries
2082 [
2083 {
2084 "title": "Groonga and MySQL",
2085 "contents": [
2086 "Groonga is a full text search engine",
2087 "MySQL is a RDBMS",
2088 "Mroonga is a MySQL storage engine based on Groonga"
2089 ]
2090 }
2091 ]
2092
2093 select Entries\
2094 --output_columns 'snippet_html(contents), contents'\
2095 --match_columns 'title'\
2096 --query Groonga
2097 # [
2098 # [
2099 # 0,
2100 # 0.0,
2101 # 0.0
2102 # ],
2103 # [
2104 # [
2105 # [
2106 # 1
2107 # ],
2108 # [
2109 # [
2110 # "snippet_html",
2111 # null
2112 # ],
2113 # [
2114 # "contents",
2115 # "ShortText"
2116 # ]
2117 # ],
2118 # [
2119 # [
2120 # "<span class=\"keyword\">Groonga</span> is a full text search engine",
2121 # "Mroonga is a MySQL storage engine based on <span class=\"keyword\">Groonga</span>"
2122 # ],
2123 # [
2124 # "Groonga is a full text search engine",
2125 # "MySQL is a RDBMS",
2126 # "Mroonga is a MySQL storage engine based on Groonga"
2127 # ]
2128 # ]
2129 # ]
2130 # ]
2131 # ]
2132 ```
2133
2134 Until now, if we specified `snippet*` like `--output_columns 'snippet_html(contents[1])`,
2135 we could extract snippets of target text around search keywords against the vector as below.
2136 However, we didn't know which we should output elements. Because we didn't know which element was hit on search.
2137
2138 ```text
2139 select Entries\
2140 --output_columns 'snippet_html(contents[0]), contents'\
2141 --match_columns 'title'\
2142 --query Groonga
2143 # [
2144 # [
2145 # 0,
2146 # 0.0,
2147 # 0.0
2148 # ],
2149 # [
2150 # [
2151 # [
2152 # 1
2153 # ],
2154 # [
2155 # [
2156 # "snippet_html",
2157 # null
2158 # ],
2159 # [
2160 # "contents",
2161 # "ShortText"
2162 # ]
2163 # ],
2164 # [
2165 # [
2166 # "<span class=\"keyword\">Groonga</span> is a full text search engine"
2167 # ],
2168 # [
2169 # "Groonga is a full text search engine",
2170 # "MySQL is a RDBMS",
2171 # "Mroonga is a MySQL storage engine based on Groonga"
2172 # ]
2173 # ]
2174 # ]
2175 # ]
2176 # ]
2177 ```
2178
2179 [{ref}`release-12-0-1`]
2180
2181 - [{doc}`/reference/commands/query_expand`] Added a support for synonym group.
2182
2183 Until now, We had to each defined a keyword and synonyms of the keyword as below when we use the synonym search.
2184
2185 ```text
2186 table_create Thesaurus TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
2187 # [[0, 1337566253.89858, 0.000355720520019531], true]
2188 column_create Thesaurus synonym COLUMN_VECTOR ShortText
2189 # [[0, 1337566253.89858, 0.000355720520019531], true]
2190 load --table Thesaurus
2191 [
2192 {"_key": "mroonga", "synonym": ["mroonga", "tritonn", "groonga mysql"]},
2193 {"_key": "groonga", "synonym": ["groonga", "senna"]}
2194 ]
2195 ```
2196
2197 In the above case, if we search `mroonga`, Groonga search `mroonga OR tritonn OR "groonga mysql"` as we intended.
2198 However, if we search `tritonn`, Groonga search only `tritonn`.
2199 If we want to search `tritonn OR mroonga OR "groonga mysql"` even if we search `tritonn`, we need had added a definition as below.
2200
2201 ```text
2202 load --table Thesaurus
2203 [
2204 {"_key": "tritonn", "synonym": ["tritonn", "mroonga", "groonga mysql"]},
2205 ]
2206 ```
2207
2208 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"`.
2209 However, until now, we had needed additional definitions in such a case.
2210 Therefore, if target keywords for synonyms are many, we are troublesome to define synonyms.
2211 Because we need to define many similar definitions.
2212
2213 In addition, when we remove synonyms, we are troublesome because we need to execute remove against many records.
2214
2215 We can make a group by deciding on a representative synonym record since this release.
2216 For example, the all following keywords are the "mroonga" group.
2217
2218 ```text
2219 load --table Synonyms
2220 [
2221 {"_key": "mroonga": "representative": "mroonga"}
2222 ]
2223
2224 load --table Synonyms
2225 [
2226 {"_key": "tritonn": "representative": "mroonga"},
2227 {"_key": "groonga mysql": "representative": "mroonga"}
2228 ]
2229 ```
2230
2231 In this case, `mroonga` is expanded to `mroonga OR tritonn OR "groonga mysql"`.
2232 In addition, `tritonn` and `"groonga mysql"` are also expanded to `mroonga OR tritonn OR "groonga mysql"`.
2233
2234 When we want to remove synonyms, we execute just remove against a target record.
2235 For example, if we want to remove `"groonga mysql"` from synonyms, we just remove `{"_key": "groonga mysql": "representative": "mroonga"}`.
2236
2237 [{ref}`release-12-0-0`]
2238
2239 - [index_column_have_source_record] Added a new function `index_column_have_source_record()`.
2240
2241 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.
2242
2243 Groonga does not remove a token even if the token become never used from records in Groonga by updating records.
2244 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.
2245 However, we can become that we don't return the needless token by using this function.
2246
2247 Because this function can detect a token that is not included in any of the records.
2248
2249 - [{doc}`/reference/commands/select`] Added new arguments `drilldown_max_n_target_records` and `drilldown[${LABEL}].max_n_target_records`.
2250
2251 We can specify the max number of records of the drilldown target table (filtered result) to use drilldown.
2252 If the number of filtered result is larger than the specified value, some records in filtered result aren't used for drilldown.
2253 The default value of this arguments are `-1`.
2254 If these arguments are set `-1`, Groonga uses all records for drilldown.
2255
2256 This argument is useful when filtered result may be very large.
2257 Because a drilldown against large filtered result may be slow.
2258 We can limit the max number of records to be used for drilldown by this feature.
2259
2260 Here is an example to limit the max number of records to be used for drilldown.
2261 The last 2 records, `{\"_id\": 4, \"tag\": \"Senna\"}` and `{\"_id\": 5, \"tag\": \"Senna\"}`, aren't used.
2262
2263 ```text
2264 table_create Entries TABLE_HASH_KEY ShortText
2265 column_create Entries content COLUMN_SCALAR Text
2266 column_create Entries n_likes COLUMN_SCALAR UInt32
2267 column_create Entries tag COLUMN_SCALAR ShortText
2268
2269 table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
2270 column_create Terms entries_key_index COLUMN_INDEX|WITH_POSITION Entries _key
2271 column_create Terms entries_content_index COLUMN_INDEX|WITH_POSITION Entries content
2272 load --table Entries
2273 [
2274 {"_key": "The first post!",
2275 "content": "Welcome! This is my first post!",
2276 "n_likes": 5,
2277 "tag": "Hello"},
2278 {"_key": "Groonga",
2279 "content": "I started to use Groonga. It's very fast!",
2280 "n_likes": 10,
2281 "tag": "Groonga"},
2282 {"_key": "Mroonga",
2283 "content": "I also started to use Mroonga. It's also very fast! Really fast!",
2284 "n_likes": 15,
2285 "tag": "Groonga"},
2286 {"_key": "Good-bye Senna",
2287 "content": "I migrated all Senna system!",
2288 "n_likes": 3,
2289 "tag": "Senna"},
2290 {"_key": "Good-bye Tritonn",
2291 "content": "I also migrated all Tritonn system!",
2292 "n_likes": 3,
2293 "tag": "Senna"}
2294 ]
2295
2296 select Entries \
2297 --limit -1 \
2298 --output_columns _id,tag \
2299 --drilldown tag \
2300 --drilldown_max_n_target_records 3
2301 # [
2302 # [
2303 # 0,
2304 # 1337566253.89858,
2305 # 0.000355720520019531
2306 # ],
2307 # [
2308 # [
2309 # [
2310 # 5
2311 # ],
2312 # [
2313 # [
2314 # "_id",
2315 # "UInt32"
2316 # ],
2317 # [
2318 # "tag",
2319 # "ShortText"
2320 # ]
2321 # ],
2322 # [
2323 # 1,
2324 # "Hello"
2325 # ],
2326 # [
2327 # 2,
2328 # "Groonga"
2329 # ],
2330 # [
2331 # 3,
2332 # "Groonga"
2333 # ],
2334 # [
2335 # 4,
2336 # "Senna"
2337 # ],
2338 # [
2339 # 5,
2340 # "Senna"
2341 # ]
2342 # ],
2343 # [
2344 # [
2345 # 2
2346 # ],
2347 # [
2348 # [
2349 # "_key",
2350 # "ShortText"
2351 # ],
2352 # [
2353 # "_nsubrecs",
2354 # "Int32"
2355 # ]
2356 # ],
2357 # [
2358 # "Hello",
2359 # 1
2360 # ],
2361 # [
2362 # "Groonga",
2363 # 2
2364 # ]
2365 # ]
2366 # ]
2367 # ]
2368 ```
2369
2370 ### Summary
2371
2372 #### Improvements
2373
2374 [{ref}`release-12-1-2`]
2375
2376 - [httpd] Updated bundled nginx to 1.23.3.
2377
2378 [{ref}`release-12-1-1`]
2379
2380 - [{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.
2381 - [{doc}`/reference/commands/select`] Specific element of vector column is now able to be search target.
2382 - [{doc}`/reference/commands/load`] Added support for `YYYY-MM-DD` time format.
2383
2384 [{ref}`release-12-1-0`]
2385
2386 - [{doc}`/reference/commands/load`] Added support for slow log output of `load`.
2387 - [{doc}`/reference/api`] Added new API `grn_is_reference_count_enable()`.
2388 - [{doc}`/reference/commands/status`] Added new items: `back_trace` and `/reference_count`.
2389
2390 [{ref}`release-12-0-9`]
2391
2392 - [{doc}`/install/almalinux`] Added support for AlmaLinux 9.
2393 - [{doc}`/reference/functions/escalate`] Added a document for the `escalate()` function.
2394 - [{doc}`/reference/normalizers`] Added `NormalizerHTML`. (Experimental)
2395 - [httpd] Updated bundled nginx to 1.23.2.
2396 - Suppressed logging a lot of same messages when no memory is available.
2397
2398 [{ref}`release-12-0-8`]
2399
2400 - Changed specification of the `escalate()` function (Experimental) to make it easier to use.
2401 - [{doc}`/install/cmake`] Added a document about how to build Groonga with CMake.
2402 - [{doc}`/install/others`] Added descriptions about how to enable/disable Apache Arrow support when building with GNU Autotools.
2403 - [{doc}`/reference/commands/select`] Added a document about {ref}`select-drilldowns-label-table`.
2404 - [{doc}`/contribution/documentation/i18n`] Updated the translation procedure.
2405
2406 [{ref}`release-12-0-7`]
2407
2408 - Added a new function `escalate()`. (experimental)
2409 - [httpd] Updated bundled nginx to 1.23.1.
2410 - [{doc}`/reference/commands/select`] Add a document for the `--n_workers` option.
2411
2412 [{ref}`release-12-0-6`]
2413
2414 - Added new Munin plugins for groonga-delta.
2415 - [{doc}`/reference/commands/column_copy`] Added support for weight vector.
2416 - [{doc}`/install/ubuntu`] Dropped support for Ubuntu 21.10 (Impish Indri).
2417 - [{doc}`/install/debian`] Dropped Debian 10 (buster) support.
2418
2419 [{ref}`release-12-0-5`]
2420
2421 - [{doc}`/reference/commands/select`] Improved a little bit of performance for prefix search by search escalation.
2422 - [{doc}`/reference/commands/select`] Added support for specifying a reference vector column with weight in `drilldowns[LABEL]._key`.
2423 - [{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`.
2424
2425 [{ref}`release-12-0-4`]
2426
2427 - [{doc}`/install/ubuntu`] Added support for Ubuntu 22.04 (Jammy Jellyfish).
2428 - We don't provide `groonga-benchmark`.
2429 - [{doc}`/reference/commands/status`] Added a new item `memory_map_size`.
2430
2431 [{ref}`release-12-0-3`]
2432
2433 - [{doc}`/reference/commands/logical_count`] Improved memory usage while `logical_count` executed.
2434 - [{doc}`/reference/commands/dump`] Added support for `MISSING_IGNORE/MISSING_NIL`.
2435 - [{doc}`/reference/functions/snippet`],[{doc}`/reference/functions/snippet_html`] Added support for text vector as input.
2436 - [`vector_join`] Added a new function `vector_join()`.
2437 - [{doc}`/reference/indexing`] Ignore too large a token like online index construction.
2438
2439 [{ref}`release-12-0-2`]
2440
2441 - [{doc}`/reference/commands/logical_range_filter`] Added support for reducing reference immediately after processing a shard.
2442 - We increased the stability of the feature of recovering on crashes.
2443 - Improved performance for mmap if anonymous mmap available.
2444 - [{doc}`/reference/indexing`] Added support for the static index construction against the following types of columns.
2445 - [{doc}`/reference/commands/column_create`] Added new flags `MISSING_*` and `INVALID_*`.
2446 - [{doc}`/reference/commands/dump`][{doc}`/reference/commands/column_list`] Added support for `MISSING_*` and `INVALID_*` flags.
2447 - [{doc}`/reference/commands/schema`] Added support for `MISSING_*` and `INVALID_*` flags.
2448 - We provided the package of Amazon Linux 2.
2449 - [Windows] Dropped support for building with Visual Studio 2017.
2450
2451 [{ref}`release-12-0-1`]
2452
2453 - [{doc}`/reference/commands/query_expand`] Added a support for synonym group.
2454 - [{doc}`/reference/commands/query_expand`] Added a support for text vector and index.
2455 - Added support for disabling a backtrace by the environment variable.
2456 - [{doc}`/reference/commands/select`] Improved performance for `--slices`.
2457 - [Windows] Added support for Visual Studio 2022.
2458 - [{doc}`/reference/commands/select`] Added support for specifing max intervals for each elements in near search.
2459 - [{doc}`/reference/executables/groonga-server-http`] We could use `groonga-server-http` even if Groonga of RPM packages.
2460
2461 [{ref}`release-12-0-0`]
2462
2463 - [{doc}`/reference/functions/sub_filter`] Added a new option `pre_filter_threshold`.
2464 - [index_column_have_source_record] Added a new function `index_column_have_source_record()`.
2465 - [{doc}`/reference/normalizers/normalizer_nfkc130`] Added a new option `strip`
2466 - [{doc}`/reference/commands/select`] Added new arguments `drilldown_max_n_target_records` and `drilldown[${LABEL}].max_n_target_records`.
2467 - [httpd] Updated bundled nginx to 1.21.6.
2468
2469 #### Fixes
2470
2471 [{ref}`release-12-1-1`]
2472
2473 - [{doc}`/reference/commands/select`] Fix a bug displaying a wrong label in `drilldown` results when `command_version` is `3`.
2474 - [{doc}`/reference/normalizers/normalizer_table`] Fix a bug for Groonga to crush with specific definition setting in `NormalizerTable`.
2475
2476 [{ref}`release-12-1-0`]
2477
2478 - [{doc}`/reference/commands/select`][{doc}`/reference/columns/vector`] Fixed a bug displaying integer in the results when a weight vector column specifies `WEIGHT FLOAT32`.
2479
2480 [{ref}`release-12-0-9`]
2481
2482 - [{doc}`/reference/commands/select`] Fixed a bug that Groonga could crash or return incorrect results when specifying {ref}`select-n-workers`.
2483
2484 [{ref}`release-12-0-8`]
2485
2486 - Fixed a bug that Groonga could return incorrect results when we use {doc}`/reference/normalizers/normalizer_table` and it contains a non-idempotent (results can be changed when executed repeatedly) definition.
2487
2488 [{ref}`release-12-0-7`]
2489
2490 - Fixed a bug Groonga's response may be slow when we execute the `request_cancel` while executing a OR search.
2491
2492 [{ref}`release-12-0-6`]
2493
2494 - Fixed a bug that Groonga may crash when we execute drilldown in a parallel by `n_workers` option.
2495 - [{doc}`/reference/commands/select`] Fixed a bug that the syntax error occurred when we specify a very long expression in `--filter`.
2496
2497 [{ref}`release-12-0-4`]
2498
2499 - Fixed a bug Groonga's response may be slow when we execute `request_cancel` while executing a search.
2500 - Fixed a bug that string list can't be casted to int32 vector.
2501 - Fixed a bug that Groonga Munin Plugins do not work on AlmaLinux 8 and CentOS 7.
2502
2503 [{ref}`release-12-0-3`]
2504
2505 - Fixed a bug that we may be not able to add a key to a table of patricia trie.