Debian Codegraph @

doc/source/news/10.rst

raw
1 News - 10 series
2 ================
3
4 .. _release-10-1-1:
5
6 Release 10.1.1 - 2021-01-25
7 ---------------------------
8
9 Improvements
10 ^^^^^^^^^^^^
11
12 * [:doc:`/reference/commands/select`] Added support for outputting UInt64 value in Apache Arrow format.
13
14 * [:doc:`/reference/commands/select`] Added support for outputting a number of hits in Apache Arrow format as below.
15
16 .. code-block::
17
18 -- metadata --
19 GROONGA:n-hits: 10
20
21 * [:doc:`/reference/functions/query`] Added support for optimization of "order by estimated size".
22
23 * Normally, we can search at high speed when we first execute a condition which number of hits is a little.
24
25 * The "B (There are few) && A (There are many)" faster than "A (There are many) && B (There are few)".
26
27 * This is a known optimization. However we need reorder conditions by ourselves.
28 * Groonga executes this reorder automatically by using optimization of "order by estimated size".
29 * This optimization is valid by ``GRN_ORDER_BY_ESTIMATED_SIZE_ENABLE=yes``.
30
31 * [:doc:`/reference/functions/between`] Improved performance by the following improvements.
32
33 * Improved the accuracy of a decision whether the ``between()`` use sequential search or not.
34 * Improved that we set a result of ``between()`` into a result set in bulk.
35
36 * [:doc:`/reference/commands/select`] Improved performance for a prefix search.
37
38 * For example, the performance of the following prefix search by using "*" improved.
39
40 .. code-block::
41
42 table_create Memos TABLE_PAT_KEY ShortText
43 table_create Contents TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
44 column_create Contents entries_key_index COLUMN_INDEX Memos _key
45
46 load --table Memos
47 [
48 {"_key": "(groonga) Start to try!"},
49 {"_key": "(mroonga) Installed"},
50 {"_key": "(groonga) Upgraded!"}
51 ]
52
53 select \
54 --table Memos \
55 --match_columns _key \
56 --query '\\(groonga\\)*'
57
58 * [:doc:`/reference/tokenizers`][TokenMecab] Improved performance for parallel construction fo token column. [GitHub#1158][Patched by naoa]
59
60 Fixes
61 ^^^^^
62
63 * [:doc:`/reference/functions/sub_filter`] Fixed a bug that ``sub_filter`` doesn't work in ``slices[].filter``.
64
65 * For example, the result of ``sub_filter`` was 0 records by the following query by this bug.
66
67 .. code-block::
68
69 table_create Users TABLE_HASH_KEY ShortText
70 column_create Users age COLUMN_SCALAR UInt8
71
72 table_create Memos TABLE_NO_KEY
73 column_create Memos user COLUMN_SCALAR Users
74 column_create Memos content COLUMN_SCALAR Text
75
76 load --table Users
77 [
78 {"_key": "alice", "age": 9},
79 {"_key": "bob", "age": 29}
80 ]
81
82 load --table Memos
83 [
84 {"user": "alice", "content": "hello"},
85 {"user": "bob", "content": "world"},
86 {"user": "alice", "content": "bye"},
87 {"user": "bob", "content": "yay"}
88 ]
89
90 select \
91 --table Memos \
92 --slices[adult].filter '_id > 1 && sub_filter(user, "age >= 18")'
93
94 * Fixed a bug that it is possible that we can't add data and Groonga crash when we repeat much addition of data and deletion of data against a hash table.
95
96 Thanks
97 ^^^^^^
98
99 * naoa
100
101 .. _release-10-1-0:
102
103 Release 10.1.0 - 2020-12-29
104 ---------------------------
105
106 Improvements
107 ^^^^^^^^^^^^
108
109 * [:doc:`/reference/functions/highlight_html`] Added support for removing leading full width spaces from highlight target. [PGroonga#GitHub#155][Reported by Hung Nguyen V]
110
111 * Until now, leading full width spaces had also included in the target of highlight as below.
112
113 .. code-block::
114
115 table_create Entries TABLE_NO_KEY
116 column_create Entries body COLUMN_SCALAR ShortText
117
118 table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
119 column_create Terms document_index COLUMN_INDEX|WITH_POSITION Entries body
120
121 load --table Entries
122 [
123 {"body": "Groonga 高速!"}
124 ]
125
126 select Entries --output_columns \
127 --match_columns body --query '高速' \
128 --output_columns 'highlight_html(body)'
129 [
130 [
131 0,
132 0.0,
133 0.0
134 ],
135 [
136 [
137 [
138 1
139 ],
140 [
141 [
142 "highlight_html",
143 null
144 ]
145 ],
146 [
147 "Groonga<span class=\"keyword\"> 高速</span>!"
148 ]
149 ]
150 ]
151 ]
152
153 * However, this is needless as the target of highlight.
154 Therefore, in this release, ``highlight_html()`` removes leading full width spaces.
155
156 * [:doc:`/reference/commands/status`] Added a new item ``features``.
157
158 * We can display which Groonga's features are enabled as below.
159
160 .. code-block::
161
162 status --output_pretty yes
163 [
164 [
165 0,
166 0.0,
167 0.0
168 ],
169 {
170 "alloc_count": 361,
171 "starttime": 1608087311,
172 "start_time": 1608087311,
173 "uptime": 35,
174 "version": "10.1.0",
175 "n_queries": 0,
176 "cache_hit_rate": 0.0,
177 "command_version": 1,
178 "default_command_version": 1,
179 "max_command_version": 3,
180 "n_jobs": 0,
181 "features": {
182 "nfkc": true,
183 "mecab": true,
184 "message_pack": true,
185 "mruby": true,
186 "onigmo": true,
187 "zlib": true,
188 "lz4": false,
189 "zstandard": false,
190 "kqueue": false,
191 "epoll": true,
192 "poll": false,
193 "rapidjson": false,
194 "apache_arrow": false,
195 "xxhash": false
196 }
197 }
198 ]
199
200 * [:doc:`/reference/commands/status`] Added a new item ``apache_arrow``.
201
202 * We can display Apache Arrow version that Groonga use as below.
203
204 .. code-block::
205
206 [
207 [
208 0,
209 1608088628.440753,
210 0.0006628036499023438
211 ],
212 {
213 "alloc_count": 360,
214 "starttime": 1608088617,
215 "start_time": 1608088617,
216 "uptime": 11,
217 "version": "10.0.9-39-g5a4c6f3",
218 "n_queries": 0,
219 "cache_hit_rate": 0.0,
220 "command_version": 1,
221 "default_command_version": 1,
222 "max_command_version": 3,
223 "n_jobs": 0,
224 "features": {
225 "nfkc": true,
226 "mecab": true,
227 "message_pack": true,
228 "mruby": true,
229 "onigmo": true,
230 "zlib": true,
231 "lz4": true,
232 "zstandard": false,
233 "kqueue": false,
234 "epoll": true,
235 "poll": false,
236 "rapidjson": false,
237 "apache_arrow": true,
238 "xxhash": false
239 },
240 "apache_arrow": {
241 "version_major": 2,
242 "version_minor": 0,
243 "version_patch": 0,
244 "version": "2.0.0"
245 }
246 }
247 ]
248
249 * This item only display when Apache Arrow is valid in Groonga.
250
251 * [:doc:`/reference/window_function`] Added support for processing all tables at once even if target tables straddle a shard. (experimental)
252
253 * If the target tables straddle a shard, the window function had processed each shard until now.
254
255 * Therefore, if we used multiple group keys in windows functions, the value of the group keys from the second had to be one kind of value.
256 * However, we can use multiple kind of values for it as below by this improvement.
257
258 .. code-block::
259
260 plugin_register sharding
261 plugin_register functions/time
262
263 table_create Logs_20170315 TABLE_NO_KEY
264 column_create Logs_20170315 timestamp COLUMN_SCALAR Time
265 column_create Logs_20170315 price COLUMN_SCALAR UInt32
266 column_create Logs_20170315 item COLUMN_SCALAR ShortText
267
268 table_create Logs_20170316 TABLE_NO_KEY
269 column_create Logs_20170316 timestamp COLUMN_SCALAR Time
270 column_create Logs_20170316 price COLUMN_SCALAR UInt32
271 column_create Logs_20170316 item COLUMN_SCALAR ShortText
272
273 table_create Logs_20170317 TABLE_NO_KEY
274 column_create Logs_20170317 timestamp COLUMN_SCALAR Time
275 column_create Logs_20170317 price COLUMN_SCALAR UInt32
276 column_create Logs_20170317 item COLUMN_SCALAR ShortText
277
278 load --table Logs_20170315
279 [
280 {"timestamp": "2017/03/15 10:00:00", "price": 1000, "item": "A"},
281 {"timestamp": "2017/03/15 11:00:00", "price": 900, "item": "A"},
282 {"timestamp": "2017/03/15 12:00:00", "price": 300, "item": "B"},
283 {"timestamp": "2017/03/15 13:00:00", "price": 200, "item": "B"}
284 ]
285
286 load --table Logs_20170316
287 [
288 {"timestamp": "2017/03/16 10:00:00", "price": 530, "item": "A"},
289 {"timestamp": "2017/03/16 11:00:00", "price": 520, "item": "B"},
290 {"timestamp": "2017/03/16 12:00:00", "price": 110, "item": "A"},
291 {"timestamp": "2017/03/16 13:00:00", "price": 410, "item": "A"},
292 {"timestamp": "2017/03/16 14:00:00", "price": 710, "item": "B"}
293 ]
294
295 load --table Logs_20170317
296 [
297 {"timestamp": "2017/03/17 10:00:00", "price": 800, "item": "A"},
298 {"timestamp": "2017/03/17 11:00:00", "price": 400, "item": "B"},
299 {"timestamp": "2017/03/17 12:00:00", "price": 500, "item": "B"},
300 {"timestamp": "2017/03/17 13:00:00", "price": 300, "item": "A"}
301 ]
302
303 table_create Times TABLE_PAT_KEY Time
304 column_create Times logs_20170315 COLUMN_INDEX Logs_20170315 timestamp
305 column_create Times logs_20170316 COLUMN_INDEX Logs_20170316 timestamp
306 column_create Times logs_20170317 COLUMN_INDEX Logs_20170317 timestamp
307
308 logical_range_filter Logs \
309 --shard_key timestamp \
310 --filter 'price >= 300' \
311 --limit -1 \
312 --columns[offsetted_timestamp].stage filtered \
313 --columns[offsetted_timestamp].type Time \
314 --columns[offsetted_timestamp].flags COLUMN_SCALAR \
315 --columns[offsetted_timestamp].value 'timestamp - 39600000000' \
316 --columns[offsetted_day].stage filtered \
317 --columns[offsetted_day].type Time \
318 --columns[offsetted_day].flags COLUMN_SCALAR \
319 --columns[offsetted_day].value 'time_classify_day(offsetted_timestamp)' \
320 --columns[n_records_per_day_and_item].stage filtered \
321 --columns[n_records_per_day_and_item].type UInt32 \
322 --columns[n_records_per_day_and_item].flags COLUMN_SCALAR \
323 --columns[n_records_per_day_and_item].value 'window_count()' \
324 --columns[n_records_per_day_and_item].window.group_keys 'offsetted_day,item' \
325 --output_columns "_id,time_format_iso8601(offsetted_day),item,n_records_per_day_and_item"
326 [
327 [
328 0,
329 0.0,
330 0.0
331 ],
332 [
333 [
334 [
335 "_id",
336 "UInt32"
337 ],
338 [
339 "time_format_iso8601",
340 null
341 ],
342 [
343 "item",
344 "ShortText"
345 ],
346 [
347 "n_records_per_day_and_item",
348 "UInt32"
349 ]
350 ],
351 [
352 1,
353 "2017-03-14T00:00:00.000000+09:00",
354 "A",
355 1
356 ],
357 [
358 2,
359 "2017-03-15T00:00:00.000000+09:00",
360 "A",
361 2
362 ],
363 [
364 3,
365 "2017-03-15T00:00:00.000000+09:00",
366 "B",
367 1
368 ],
369 [
370 1,
371 "2017-03-15T00:00:00.000000+09:00",
372 "A",
373 2
374 ],
375 [
376 2,
377 "2017-03-16T00:00:00.000000+09:00",
378 "B",
379 2
380 ],
381 [
382 4,
383 "2017-03-16T00:00:00.000000+09:00",
384 "A",
385 2
386 ],
387 [
388 5,
389 "2017-03-16T00:00:00.000000+09:00",
390 "B",
391 2
392 ],
393 [
394 1,
395 "2017-03-16T00:00:00.000000+09:00",
396 "A",
397 2
398 ],
399 [
400 2,
401 "2017-03-17T00:00:00.000000+09:00",
402 "B",
403 2
404 ],
405 [
406 3,
407 "2017-03-17T00:00:00.000000+09:00",
408 "B",
409 2
410 ],
411 [
412 4,
413 "2017-03-17T00:00:00.000000+09:00",
414 "A",
415 1
416 ]
417 ]
418 ]
419
420 * This feature requires Apache Arrow 3.0.0 that is not released yet.
421
422 * Added support for sequential search against reference column.
423
424 * This feature is only used if an index search will match many records and the current result set is enough small.
425
426 * Because the sequential search is faster than the index search in the above case.
427
428 * It is invalid by default.
429 * It is valid if we set ``GRN_II_SELECT_TOO_MANY_INDEX_MATCH_RATIO_REFERENCE`` environment variable.
430
431 * ``GRN_II_SELECT_TOO_MANY_INDEX_MATCH_RATIO_REFERENCE`` environment variable is a threshold to switch the sequential search from the index search.
432
433 * For example, if we set ``GRN_II_SELECT_TOO_MANY_INDEX_MATCH_RATIO_REFERENCE=0.7`` as below, if the number of records for the result set less than 70 % of total records, a search is executed by a sequential search.
434
435 .. code-block ::
436
437 $ export GRN_II_SELECT_TOO_MANY_INDEX_MATCH_RATIO_REFERENCE=0.7
438
439 table_create Tags TABLE_HASH_KEY ShortText
440 table_create Memos TABLE_HASH_KEY ShortText
441 column_create Memos tag COLUMN_SCALAR Tags
442
443 load --table Memos
444 [
445 {"_key": "Rroonga is fast!", "tag": "Rroonga"},
446 {"_key": "Groonga is fast!", "tag": "Groonga"},
447 {"_key": "Mroonga is fast!", "tag": "Mroonga"},
448 {"_key": "Groonga sticker!", "tag": "Groonga"},
449 {"_key": "Groonga is good!", "tag": "Groonga"}
450 ]
451
452 column_create Tags memos_tag COLUMN_INDEX Memos tag
453
454 select Memos --query '_id:>=3 tag:@Groonga' --output_columns _id,_score,_key,tag
455 [
456 [
457 0,
458 0.0,
459 0.0
460 ],
461 [
462 [
463 [
464 2
465 ],
466 [
467 [
468 "_id",
469 "UInt32"
470 ],
471 [
472 "_score",
473 "Int32"
474 ],
475 [
476 "_key",
477 "ShortText"
478 ],
479 [
480 "tag",
481 "Tags"
482 ]
483 ],
484 [
485 4,
486 2,
487 "Groonga sticker!",
488 "Groonga"
489 ],
490 [
491 5,
492 2,
493 "Groonga is good!",
494 "Groonga"
495 ]
496 ]
497 ]
498 ]
499
500 * [tokenizers] Added support for the token column into ``TokenDocumentVectorTFIDF`` and ``TokenDocumentVectorBM25``.
501
502 * If there is the token column that has the same source as the index column, these tokenizer use the token id of the token column.
503
504 * The token column has already had data that has already finished tokenize.
505 * Therefore, these tokenizer are improved performance by using a token column.
506
507 * For example, we can use this feature by making a token column named ``content_tokens`` as below.
508
509 .. code-block::
510
511 table_create Memos TABLE_NO_KEY
512 column_create Memos content COLUMN_SCALAR Text
513
514 load --table Memos
515 [
516 {"content": "a b c a"},
517 {"content": "c b c"},
518 {"content": "b b a"},
519 {"content": "a c c"},
520 {"content": "a"}
521 ]
522
523 table_create Tokens TABLE_PAT_KEY ShortText \
524 --normalizer NormalizerNFKC121 \
525 --default_tokenizer TokenNgram
526 column_create Tokens memos_content COLUMN_INDEX|WITH_POSITION Memos content
527
528 column_create Memos content_tokens COLUMN_VECTOR Tokens content
529
530 table_create DocumentVectorBM25 TABLE_HASH_KEY Tokens \
531 --default_tokenizer \
532 'TokenDocumentVectorBM25("index_column", "memos_content", \
533 "df_column", "df")'
534 column_create DocumentVectorBM25 df COLUMN_SCALAR UInt32
535
536 column_create Memos content_feature COLUMN_VECTOR|WITH_WEIGHT|WEIGHT_FLOAT32 \
537 DocumentVectorBM25 content
538
539 select Memos
540 [
541 [
542 0,
543 0.0,
544 0.0
545 ],
546 [
547 [
548 [
549 5
550 ],
551 [
552 [
553 "_id",
554 "UInt32"
555 ],
556 [
557 "content",
558 "Text"
559 ],
560 [
561 "content_feature",
562 "DocumentVectorBM25"
563 ],
564 [
565 "content_tokens",
566 "Tokens"
567 ]
568 ],
569 [
570 1,
571 "a b c a",
572 {
573 "a": 0.5095787,
574 "b": 0.6084117,
575 "c": 0.6084117
576 },
577 [
578 "a",
579 "b",
580 "c",
581 "a"
582 ]
583 ],
584 [
585 2,
586 "c b c",
587 {
588 "c": 0.8342565,
589 "b": 0.5513765
590 },
591 [
592 "c",
593 "b",
594 "c"
595 ]
596 ],
597 [
598 3,
599 "b b a",
600 {
601 "b": 0.9430448,
602 "a": 0.3326656
603 },
604 [
605 "b",
606 "b",
607 "a"
608 ]
609 ],
610 [
611 4,
612 "a c c",
613 {
614 "a": 0.3326656,
615 "c": 0.9430448
616 },
617 [
618 "a",
619 "c",
620 "c"
621 ]
622 ],
623 [
624 5,
625 "a",
626 {
627 "a": 1.0
628 },
629 [
630 "a"
631 ]
632 ]
633 ]
634 ]
635 ]
636
637 * ``TokenDocumentVectorTFIDF`` and ``TokenDocumentVectorBM25`` give a weight against each tokens.
638
639 * ``TokenDocumentVectorTFIDF`` calculate a weight for token by using TF-IDF.
640
641 * Please refer to https://radimrehurek.com/gensim/models/tfidfmodel.html about TF-IDF.
642
643 * ``TokenDocumentVectorBM25`` calculate a weight for token by using Okapi BM25.
644
645 * Please refer to https://en.wikipedia.org/wiki/Okapi_BM25 about Okapi BM25.
646
647 * Improved performance when below case.
648
649 * ``(column @ "value") && (column @ "value")``
650
651 * [:doc:`/install/ubuntu`] Added support for Ubuntu 20.10 (Groovy Gorilla).
652
653 * [:doc:`/install/debian`] Dropped stretch support.
654
655 * It reached EOL.
656
657 * [:doc:`/install/centos`] Dropped CentOS 6.
658
659 * It reached EOL.
660
661 * [httpd] Updated bundled nginx to 1.19.6.
662
663 Fixes
664 ^^^^^
665
666 * Fixed a bug that Groonga crash when we use multiple keys drilldown and use multiple accessor as below. [GitHub#1153][Patched by naoa]
667
668 .. code-block::
669
670 table_create Tags TABLE_PAT_KEY ShortText
671
672 table_create Memos TABLE_HASH_KEY ShortText
673 column_create Memos tags COLUMN_VECTOR Tags
674 column_create Memos year COLUMN_SCALAR Int32
675
676 load --table Memos
677 [
678 {"_key": "Groonga is fast!", "tags": ["full-text-search"], "year": 2019},
679 {"_key": "Mroonga is fast!", "tags": ["mysql", "full-text-search"], "year": 2019},
680 {"_key": "Groonga sticker!", "tags": ["full-text-search", "sticker"], "year": 2020},
681 {"_key": "Rroonga is fast!", "tags": ["full-text-search", "ruby"], "year": 2020},
682 {"_key": "Groonga is good!", "tags": ["full-text-search"], "year": 2020}
683 ]
684
685 select Memos \
686 --filter '_id > 0' \
687 --drilldowns[tags].keys 'tags,year >= 2020' \
688 --drilldowns[tags].output_columns _key[0],_key[1],_nsubrecs
689
690 select Memos \
691 --filter '_id > 0' \
692 --drilldowns[tags].keys 'tags,year >= 2020' \
693 --drilldowns[tags].output_columns _key[1],_nsubrecs
694
695 * Fixed a bug that the near phrase search did not match when the same phrase occurs multiple times as below.
696
697 .. code-block::
698
699 table_create Entries TABLE_NO_KEY
700 column_create Entries content COLUMN_SCALAR Text
701
702 table_create Terms TABLE_PAT_KEY ShortText \
703 --default_tokenizer TokenNgram \
704 --normalizer NormalizerNFKC121
705 column_create Terms entries_content COLUMN_INDEX|WITH_POSITION Entries content
706
707 load --table Entries
708 [
709 {"content": "a x a x b x x"},
710 {"content": "a x x b x"}
711 ]
712
713 select Entries \
714 --match_columns content \
715 --query '*NP2"a b"' \
716 --output_columns '_score, content'
717
718
719 Thanks
720 ^^^^^^
721
722 * Hung Nguyen V
723
724 * naoa
725
726 * timgates42 [Provided the patch at GitHub#1155]
727
728 .. _release-10-0-9:
729
730 Release 10.0.9 - 2020-12-01
731 ---------------------------
732
733 Improvements
734 ^^^^^^^^^^^^
735
736 * Improved performance when we specified ``-1`` to ``limit``.
737
738 * [:doc:`/reference/commands/reference_acquire`] Added a new option ``--auto_release_count``.
739
740 * Groonga reduces a reference count automatically when a request reaching the number of value that is specified in ``--auto_release_count``.
741
742 * For example, the acquired reference of ``Users`` is released automatically after the second ``status`` is processed as below.
743
744 .. code-block::
745
746 reference_acquire --target_name Users --auto_release_count 2
747 status # Users is still referred.
748 status # Users' reference is released after this command is processed.
749
750 * We can prevent a leak of the release of acquired reference by this option.
751
752 * Modify behavior when Groonga evaluated empty ``vector`` and ``uvector``.
753
754 * Empty ``vector`` and ``uvector`` are evaluated to ``false`` in command version 3.
755
756 * This behavior is valid for only command version 3.
757 * Note that the different behavior until now.
758
759 * [:doc:`/reference/normalizers`] Added a new Normalizer ``NormalizerNFKC130`` based on Unicode NFKC (Normalization Form Compatibility Composition) for Unicode 13.0.
760
761 * [:doc:`/reference/token_filters`] Added a new TokenFilter ``TokenFilterNFKC130`` based on Unicode NFKC (Normalization Form Compatibility Composition) for Unicode 13.0.
762
763 * [:doc:`/reference/commands/select`] Improved performance for ``"_score = column - X"``.
764
765 * [:doc:`/reference/commands/reference_acquire`] Improved that ``--reference_acquire`` doesn't get unnecessary reference of index column when we specify the ``--recursive dependent`` option.
766
767 * From this release, the targets of ``--recursive dependent`` are only the target table's key and the index column that is set to data column.
768
769 * [:doc:`/reference/commands/select`] Add support for ordered near phrase search.
770
771 * Until now, the near phrase search have only looked for records that the distance of between specified phrases near.
772 * This feature look for satisfy the following conditions records.
773
774 * If the distance of between specified phrases is near.
775 * If the specified phrases are in line with specified order.
776
777 * This feature use ``*ONP`` as an operator. (Note that the operator isn't ``*NP``.)
778
779 * ``$`` is handled as itself in the query syntax. Note that it isn't a special character in the query syntax.
780
781 * If we use script syntax, this feature use as below.
782
783 .. code-block::
784
785 table_create Entries TABLE_NO_KEY
786 column_create Entries content COLUMN_SCALAR Text
787
788 table_create Terms TABLE_PAT_KEY ShortText \
789 --default_tokenizer 'TokenNgram("unify_alphabet", false, \
790 "unify_digit", false)' \
791 --normalizer NormalizerNFKC121
792 column_create Terms entries_content COLUMN_INDEX|WITH_POSITION Entries content
793
794 load --table Entries
795 [
796 {"content": "abcXYZdef"},
797 {"content": "abebcdXYZdef"},
798 {"content": "abcdef"},
799 {"content": "defXYZabc"},
800 {"content": "XYZabc"},
801 {"content": "abc123456789def"},
802 {"content": "abc12345678def"},
803 {"content": "abc1de2def"}
804 ]
805
806 select Entries --filter 'content *ONP "abc def"' --output_columns '_score, content'
807 [
808 [
809 0,
810 0.0,
811 0.0
812 ],
813 [
814 [
815 [
816 4
817 ],
818 [
819 [
820 "_score",
821 "Int32"
822 ],
823 [
824 "content",
825 "Text"
826 ]
827 ],
828 [
829 1,
830 "abcXYZdef"
831 ],
832 [
833 1,
834 "abcdef"
835 ],
836 [
837 1,
838 "abc12345678def"
839 ],
840 [
841 1,
842 "abc1de2def"
843 ]
844 ]
845 ]
846 ]
847
848 * If we use query syntax, this feature use as below.
849
850 .. code-block::
851
852 select Entries --query 'content:*ONP "abc def"' --output_columns '_score, content'
853 [
854 [
855 0,
856 0.0,
857 0.0
858 ],
859 [
860 [
861 [
862 4
863 ],
864 [
865 [
866 "_score",
867 "Int32"
868 ],
869 [
870 "content",
871 "Text"
872 ]
873 ],
874 [
875 1,
876 "abcXYZdef"
877 ],
878 [
879 1,
880 "abcdef"
881 ],
882 [
883 1,
884 "abc12345678def"
885 ],
886 [
887 1,
888 "abc1de2def"
889 ]
890 ]
891 ]
892 ]
893
894 * [httpd] Updated bundled nginx to 1.19.5.
895
896 Fixes
897 ^^^^^
898
899 * [:doc:`/reference/executables/groonga-server-http`] Fixed that Groonga HTTP server finished without waiting all woker threads finished completely.
900
901 * Until now, Groonga HTTP server had started the process of finish after worker threads finished itself process.
902 However, worker threads may not finish completely at this timing. Therefore, Groonga HTTP server may crashed according to timing. Because Groonga HTTP server may free area of memory that worker threads are using them yet.
903
904 .. _release-10-0-8:
905
906 Release 10.0.8 - 2020-10-29
907 ---------------------------
908
909 Improvements
910 ^^^^^^^^^^^^
911
912 * [:doc:`/reference/commands/select`] Added support for large drilldown keys.
913
914 * The maximum on the key size of Groonga's tables are 4KiB.
915 However, if we specify multiple keys in drilldown, the size of drilldown keys may be larger than 4KiB.
916
917 * For example, if the total size for ``tag`` key and ``n_like`` key is lager than 4KiB in the following case,
918 the drilldown had failed.
919
920 .. code-block::
921
922 select Entries \
923 --limit -1 \
924 --output_columns tag,n_likes \
925 --drilldowns[tag.n_likes].keys tag,n_likes \
926 --drilldowns[tag.n_likes].output_columns _value.tag,_value.n_likes,_nsubrecs
927
928 * Because the drilldown packs specifying all keys for drilldown. So, if each the size of drilldown key is large,
929 the size of the packed drilldown keys is larger than 4KiB.
930
931 * This feature requires `xxHash <https://github.com/Cyan4973/xxHash>`_ .
932
933 * However, if we install Groonga from package, we can use this feature without doing anything special.
934 Because Groonga's package already include `xxHash <https://github.com/Cyan4973/xxHash>`_ .
935
936 * [:doc:`/reference/commands/select`] Added support for handling as the same dynamic column even if columns refer to different tables.
937
938 * We can't have handled the same dynamic column if columns refer to different tables until now.
939 Because the type of columns is different.
940
941 * However, from this version, we can handle the same dynamic column even if columns refer to different tables by casting to built-in types as below.
942
943 .. code-block::
944
945 table_create Store_A TABLE_HASH_KEY ShortText
946 table_create Store_B TABLE_HASH_KEY ShortText
947
948 table_create Customers TABLE_HASH_KEY Int32
949 column_create Customers customers_A COLUMN_VECTOR Store_A
950 column_create Customers customers_B COLUMN_VECTOR Store_B
951
952 load --table Customers
953 [
954 {"_key": 1604020694, "customers_A": ["A", "B", "C"]},
955 {"_key": 1602724694, "customers_B": ["Z", "V", "Y", "T"]},
956 ]
957
958 select Customers \
959 --filter '_key == 1604020694' \
960 --columns[customers].stage output \
961 --columns[customers].flags COLUMN_VECTOR \
962 --columns[customers].type ShortText \
963 --columns[customers].value 'customers_A' \
964 --output_columns '_key, customers'
965
966 * We have needed to set ``Store_A`` or ``Store_B`` in the ``type`` of ``customers`` column until now.
967 * The type of ``customers_A`` column cast to ``ShortText`` in the above example.
968 * By this, we can also set the value of ``customers_B`` in the value of ``customers`` column.
969 Because both the key of ``customers_A`` and ``customers_B`` are ``ShortText`` type.
970
971 * [:doc:`/reference/commands/select`] Improved performance when the number of records for search result are huge.
972
973 * This optimization works when below cases.
974
975 * ``--filter 'column <= "value"'`` or ``--filter 'column >= "value"'``
976 * ``--filter 'column == "value"'``
977 * ``--filter 'between(...)'`` or ``--filter 'between(_key, ...)'``
978 * ``--filter 'sub_filter(reference_column, ...)'``
979 * Comparing against ``_key`` such as ``--filter '_key > "value"'``.
980 * ``--filter 'geo_in_circle(...)'``
981
982 * Updated bundled LZ4 to 1.9.2 from 1.8.2.
983
984 * Added support xxHash 0.8
985
986 * [httpd] Updated bundled nginx to 1.19.4.
987
988 Fixes
989 ^^^^^
990
991 * Fixed the following bugs related the browser based administration tool. [GitHub#1139][Reported by sutamin]
992
993 * The problem that Groonga's logo had not been displayed.
994 * The problem that the throughput chart had not been displayed on the index page for Japanese.
995
996 * [:doc:`/reference/functions/between`] Fixed a bug that ``between(_key, ...)`` is always evaluated by sequential search.
997
998 Thanks
999 ^^^^^^
1000
1001 * sutamin
1002
1003 .. _release-10-0-7:
1004
1005 Release 10.0.7 - 2020-09-29
1006 ---------------------------
1007
1008 Improvements
1009 ^^^^^^^^^^^^
1010
1011 * [highlight], [:doc:`/reference/functions/highlight_full`] Added support for normalizer options.
1012
1013 * [:doc:`/reference/command/return_code`] Added a new return code ``GRN_CONNECTION_RESET`` for resetting connection.
1014
1015 * it is returned when an existing connection was forcibly close by the remote host.
1016
1017 * Dropped Ubuntu 19.10 (Eoan Ermine).
1018
1019 * Because this version has been EOL.
1020
1021 * [httpd] Updated bundled nginx to 1.19.2.
1022
1023 * [:doc:`/reference/executables/grndb`] Added support for detecting duplicate keys.
1024
1025 * ``grndb check`` is also able to detect duplicate keys since this release.
1026 * This check valid except a table of ``TABLE_NO_KEY``.
1027 * If the table that was detected duplicate keys by ``grndb check`` has only index columns, we can recover by ``grndb recover``.
1028
1029 * [:doc:`/reference/commands/table_create`], [:doc:`/reference/commands/column_create`] Added a new option ``--path``
1030
1031 * We can store specified a table or a column to any path using this option.
1032 * This option is useful if we want to store a table or a column that
1033 we often use to fast storage (e.g. SSD) and store them that we don't often
1034 use to slow storage (e.g. HDD).
1035 * We can specify both relative path and absolute path in this option.
1036
1037 * If we specify relative path in this option, the path is resolved the path of ``groonga`` process as the origin.
1038
1039 * However, if we specify ``--path``, the result of ``dump`` command includes ``--path`` informations.
1040
1041 * Therefore, if we specify ``--path``, we can't restore to host in different enviroment.
1042
1043 * Because the directory configuration and the location of ``groonga`` process in different by each enviroment.
1044
1045 * If we don't want include ``--path`` informations to a dump, we need specify ``--dump_paths no`` in ``dump`` command.
1046
1047 * [:doc:`/reference/commands/dump`] Added a new option ``--dump_paths``.
1048
1049 * ``--dump_paths`` option control whether ``--path`` is dumped or not.
1050 * The default value of it is ``yes``.
1051 * If we specify ``--path`` when we create tables or columns and we don't want include ``--path`` informations to a dump, we specify ``no`` into ``--dump_paths`` when we execute ``dump`` command.
1052
1053 * [functions] Added a new function ``string_toknize()``.
1054
1055 * It tokenizes the column value that is specified in the second argument with the tokenizer that is specified in the first argument.
1056
1057 * [tokenizers] Added a new tokenizer ``TokenDocumentVectorTFIDF`` (experimental).
1058
1059 * It generates automatically document vector by TF-IDF.
1060
1061 * [tokenizers] Added a new tokenizer ``TokenDocumentVectorBM25`` (experimental).
1062
1063 * It generates automatically document vector by BM25.
1064
1065 * [:doc:`/reference/commands/select`] Added support for near search in same sentence.
1066
1067 Fixes
1068 ^^^^^
1069
1070 * [:doc:`/reference/commands/load`] Fixed a bug that ``load`` didn't a return response when we executed it against 257 columns.
1071
1072 * This bug may occur from 10.0.4 or later.
1073 * This bug only occur when we load data by using ``[a, b, c, ...]`` format.
1074
1075 * If we load data by using ``[{...}]``, this bug doesn't occur.
1076
1077 * [MessagePack] Fixed a bug that float32 value wasn't unpacked correctly.
1078
1079 * Fixed the following bugs related multi column index.
1080
1081 * ``_score`` may be broken with full text search.
1082 * The records that couldn't hit might hit.
1083 * Please refer to the following URL for the details about occurrence conditioning of this bug.
1084
1085 * https://groonga.org/en/blog/2020/09/29/groonga-10.0.7.html#multi-column-index
1086
1087 .. _release-10-0-6:
1088
1089 Release 10.0.6 - 2020-08-29
1090 ---------------------------
1091
1092 Improvements
1093 ^^^^^^^^^^^^
1094
1095 * [:doc:`/reference/commands/logical_range_filter`] Improved search plan for large data.
1096
1097 * Normally, ``logical_range_filter`` is faster than ``logical_select``.
1098 However, it had been slower than ``logical_select`` in the below case.
1099
1100 * If Groonga can't get the number of required records easily, it has the feature that switches index search from sequential search. (Normally, ``logical_range_filter`` uses a sequential search when records of search target are many.)
1101 * The search process for it is almost the same as ``logical_select`` if the above switching occurred.
1102 So, ``logical_range_filter`` is severalfold slower than ``logical_select`` in the above case if the search target is large data.
1103 Because ``logical_range_filter`` executes sort after the search.
1104
1105 * If we search for large data, Groonga easily use sequential search than until now since this release.
1106 * Therefore, ``logical_range_filter`` will improve performance. Because the case of the search process almost the same as ``logical_select`` decreases.
1107
1108 * [httpd] Updated bundled nginx to 1.19.1.
1109
1110 * Modify how to install into Debian GNU/Linux.
1111
1112 * We modify to use ``groonga-apt-source`` instead of ``groonga-archive-keyring``. Because the ``lintian`` command recommends using ``apt-source`` if a package that it puts files under the ``/etc/apt/sources.lists.d/``.
1113
1114 * The ``lintian`` command is the command which checks for many common packaging errors.
1115 * Please also refer to the following URL for the details about installation procedures.
1116
1117 * https://groonga.org/docs/install/debian.html
1118
1119 * [:doc:`/reference/commands/logical_select`] Added a support for ``highlight_html`` and ``highlight_full`` .
1120
1121 * Added support for recycling the IDs of records that are deleted when an array without value space delete.[GitHub#mroonga/mroonga#327][Reported by gaeeyo]
1122
1123 * If an array that doesn't have value space is deleted, deleted IDs are never recycled.
1124 * Groonga had used large storage space by large ID. Because it uses large storage space by itself.
1125
1126 * For example, large ID is caused after many adds and deletes like Mroonga's ``mroonga_operations``
1127
1128 * [:doc:`/reference/commands/select`] Improved performance of full-text-search without index.
1129
1130 * [:doc:`/reference/function`] Improved performance for calling of function that all arguments a variable reference or literal.
1131
1132 * [:doc:`/reference/indexing`] Improved performance of offline index construction by using token column. [GitHub#1126][Patched by naoa]
1133
1134 * Improved performance for ``"_score = func(...)"``.
1135
1136 * The performance when the ``_score`` value calculate by using only function like ``"_score = func(...)"`` improved.
1137
1138 Fixes
1139 ^^^^^
1140
1141 * Fixed a bug that garbage may be included in response after response send error.
1142
1143 * It may occur if a client didn't read all responses and closed the connection.
1144
1145
1146 Thanks
1147 ^^^^^^
1148
1149 * gaeeyo
1150
1151 * naoa
1152
1153 .. _release-10-0-5:
1154
1155 Release 10.0.5 - 2020-07-30
1156 ---------------------------
1157
1158 Improvements
1159 ^^^^^^^^^^^^
1160
1161 * [:doc:`/reference/commands/select`] Added support for storing reference in table that we specify with ``--load_table``.
1162
1163 * ``--load_table`` is a feature that stores search results to the table in a prepared.
1164
1165 * If the searches are executed multiple times, we can cache the search results by storing them to this table.
1166 * We can shorten the search times that the search after the first time by using this table.
1167
1168 * We can store a reference to other tables into the key of this table as below since this release.
1169
1170 * We can make a smaller size of this table. Because we only store references without store column values.
1171 * If we search against this table, we can search by using indexes for reference destination.
1172
1173 .. code-block::
1174
1175 table_create Logs TABLE_HASH_KEY ShortText
1176 column_create Logs timestamp COLUMN_SCALAR Time
1177
1178 table_create Times TABLE_PAT_KEY Time
1179 column_create Times logs_timestamp COLUMN_INDEX Logs timestamp
1180
1181 table_create LoadedLogs TABLE_HASH_KEY Logs
1182
1183 load --table Logs
1184 [
1185 {
1186 "_key": "2015-02-03:1",
1187 "timestamp": "2015-02-03 10:49:00"
1188 },
1189 {
1190 "_key": "2015-02-03:2",
1191 "timestamp": "2015-02-03 12:49:00"
1192 },
1193 {
1194 "_key": "2015-02-04:1",
1195 "timestamp": "2015-02-04 00:00:00"
1196 }
1197 ]
1198
1199 select \
1200 Logs \
1201 --load_table LoadedLogs \
1202 --load_columns "_key" \
1203 --load_values "_key" \
1204 --limit 0
1205
1206 select \
1207 --table LoadedLogs \
1208 --filter 'timestamp >= "2015-02-03 12:49:00"'
1209 [
1210 [
1211 0,
1212 0.0,
1213 0.0
1214 ],
1215 [
1216 [
1217 [
1218 2
1219 ],
1220 [
1221 [
1222 "_id",
1223 "UInt32"
1224 ],
1225 [
1226 "_key",
1227 "ShortText"
1228 ],
1229 [
1230 "timestamp",
1231 "Time"
1232 ]
1233 ],
1234 [
1235 2,
1236 "2015-02-03:2",
1237 1422935340.0
1238 ],
1239 [
1240 3,
1241 "2015-02-04:1",
1242 1422975600.0
1243 ]
1244 ]
1245 ]
1246 ]
1247
1248 * [:doc:`/reference/commands/select`] Improved sort performance on below cases.
1249
1250 * When many sort keys need ID resolution.
1251
1252 * For example, the following expression needs ID resolution.
1253
1254 * ``--filter true --sort_keys column``
1255
1256 * For example, the following expression doesn't need ID resolution.
1257 Because the ``_score`` pseudo column exists in the result table not the source table.
1258
1259 * ``--filter true --sort_keys _score``
1260
1261 * When a sort target table has a key.
1262
1263 * Therefore, ``TABLE_NO_KEY`` isn't supported this improvement.
1264
1265 * [:doc:`/reference/commands/select`] Improved performance a bit on below cases.
1266
1267 * A case of searching for many records matches.
1268 * A case of drilldown for many records.
1269
1270 * [aggregator] Added support for score accessor for target. [GitHub#1120][Patched by naoa]
1271
1272 * For example, we can ``_score`` subject to ``aggregator_*`` as below.
1273
1274 .. code-block::
1275
1276 table_create Items TABLE_HASH_KEY ShortText
1277 column_create Items price COLUMN_SCALAR UInt32
1278 column_create Items tag COLUMN_SCALAR ShortText
1279
1280 load --table Items
1281 [
1282 {"_key": "Book", "price": 1000, "tag": "A"},
1283 {"_key": "Note", "price": 1000, "tag": "B"},
1284 {"_key": "Box", "price": 500, "tag": "B"},
1285 {"_key": "Pen", "price": 500, "tag": "A"},
1286 {"_key": "Food", "price": 500, "tag": "C"},
1287 {"_key": "Drink", "price": 300, "tag": "B"}
1288 ]
1289
1290 select Items \
1291 --filter true \
1292 --drilldowns[tag].keys tag \
1293 --drilldowns[tag].output_columns _key,_nsubrecs,score_mean \
1294 --drilldowns[tag].columns[score_mean].stage group \
1295 --drilldowns[tag].columns[score_mean].type Float \
1296 --drilldowns[tag].columns[score_mean].flags COLUMN_SCALAR \
1297 --drilldowns[tag].columns[score_mean].value 'aggregator_mean(_score)'
1298 [
1299 [
1300 0,
1301 0.0,
1302 0.0
1303 ],
1304 [
1305 [
1306 [
1307 6
1308 ],
1309 [
1310 [
1311 "_id",
1312 "UInt32"
1313 ],
1314 [
1315 "_key",
1316 "ShortText"
1317 ],
1318 [
1319 "price",
1320 "UInt32"
1321 ],
1322 [
1323 "tag",
1324 "ShortText"
1325 ]
1326 ],
1327 [
1328 1,
1329 "Book",
1330 1000,
1331 "A"
1332 ],
1333 [
1334 2,
1335 "Note",
1336 1000,
1337 "B"
1338 ],
1339 [
1340 3,
1341 "Box",
1342 500,
1343 "B"
1344 ],
1345 [
1346 4,
1347 "Pen",
1348 500,
1349 "A"
1350 ],
1351 [
1352 5,
1353 "Food",
1354 500,
1355 "C"
1356 ],
1357 [
1358 6,
1359 "Drink",
1360 300,
1361 "B"
1362 ]
1363 ],
1364 {
1365 "tag": [
1366 [
1367 3
1368 ],
1369 [
1370 [
1371 "_key",
1372 "ShortText"
1373 ],
1374 [
1375 "_nsubrecs",
1376 "Int32"
1377 ],
1378 [
1379 "score_mean",
1380 "Float"
1381 ]
1382 ],
1383 [
1384 "A",
1385 2,
1386 1.0
1387 ],
1388 [
1389 "B",
1390 3,
1391 1.0
1392 ],
1393 [
1394 "C",
1395 1,
1396 1.0
1397 ]
1398 ]
1399 }
1400 ]
1401 ]
1402
1403 * [:doc:`/reference/indexing`] Improved performance of offline index construction on VC++ version.
1404
1405 * [:doc:`/reference/commands/select`] Use ``null`` instead ``NaN``, ``Infinity``, and ``-Infinity`` when Groonga outputs result for JSON format.
1406
1407 * Because JSON doesn't support them.
1408
1409 * [:doc:`/reference/commands/select`] Add support fot aggregating standard deviation value.
1410
1411 * For example, we can calculate a standard deviation for every group as below.
1412
1413 .. code-block::
1414
1415 table_create Items TABLE_HASH_KEY ShortText
1416 column_create Items price COLUMN_SCALAR UInt32
1417 column_create Items tag COLUMN_SCALAR ShortText
1418
1419 load --table Items
1420 [
1421 {"_key": "Book", "price": 1000, "tag": "A"},
1422 {"_key": "Note", "price": 1000, "tag": "B"},
1423 {"_key": "Box", "price": 500, "tag": "B"},
1424 {"_key": "Pen", "price": 500, "tag": "A"},
1425 {"_key": "Food", "price": 500, "tag": "C"},
1426 {"_key": "Drink", "price": 300, "tag": "B"}
1427 ]
1428
1429 select Items \
1430 --drilldowns[tag].keys tag \
1431 --drilldowns[tag].output_columns _key,_nsubrecs,price_sd \
1432 --drilldowns[tag].columns[price_sd].stage group \
1433 --drilldowns[tag].columns[price_sd].type Float \
1434 --drilldowns[tag].columns[price_sd].flags COLUMN_SCALAR \
1435 --drilldowns[tag].columns[price_sd].value 'aggregator_sd(price)' \
1436 --output_pretty yes
1437 [
1438 [
1439 0,
1440 1594339851.924836,
1441 0.002813816070556641
1442 ],
1443 [
1444 [
1445 [
1446 6
1447 ],
1448 [
1449 [
1450 "_id",
1451 "UInt32"
1452 ],
1453 [
1454 "_key",
1455 "ShortText"
1456 ],
1457 [
1458 "price",
1459 "UInt32"
1460 ],
1461 [
1462 "tag",
1463 "ShortText"
1464 ]
1465 ],
1466 [
1467 1,
1468 "Book",
1469 1000,
1470 "A"
1471 ],
1472 [
1473 2,
1474 "Note",
1475 1000,
1476 "B"
1477 ],
1478 [
1479 3,
1480 "Box",
1481 500,
1482 "B"
1483 ],
1484 [
1485 4,
1486 "Pen",
1487 500,
1488 "A"
1489 ],
1490 [
1491 5,
1492 "Food",
1493 500,
1494 "C"
1495 ],
1496 [
1497 6,
1498 "Drink",
1499 300,
1500 "B"
1501 ]
1502 ],
1503 {
1504 "tag": [
1505 [
1506 3
1507 ],
1508 [
1509 [
1510 "_key",
1511 "ShortText"
1512 ],
1513 [
1514 "_nsubrecs",
1515 "Int32"
1516 ],
1517 [
1518 "price_sd",
1519 "Float"
1520 ]
1521 ],
1522 [
1523 "A",
1524 2,
1525 250.0
1526 ],
1527 [
1528 "B",
1529 3,
1530 294.3920288775949
1531 ],
1532 [
1533 "C",
1534 1,
1535 0.0
1536 ]
1537 ]
1538 }
1539 ]
1540 ]
1541
1542 * We can also calculate sample standard deviation to specifing ``aggregate_sd(target, {"unbiased": true})``.
1543
1544 * [Windows] Dropped Visual Studio 2013 support.
1545
1546 Fixes
1547 ^^^^^
1548
1549 * [:doc:`/reference/executables/groonga-server-http`] Fixed a bug that a request can't halt even if we execute ``shutdown?mode=immediate`` when the response was halted by error occurrence.
1550
1551 * Fixed a crash bug when an error occurs while a request.
1552
1553 * It only occurs when we use Apache Arrow Format.
1554 * Groonga crashes when we send request to Groonga again after the previous request was halted by error occurrence.
1555
1556 * [:doc:`/reference/functions/between`] Fixed a crash bug when temporary table is used.
1557
1558 * For example, if we specify a dynamic column in the first argument for ``between``, Groonga had crashed.
1559
1560 * Fixed a bug that procedure created by plugin is freed unexpectedly.
1561
1562 * It's only occurred in reference count mode.
1563 * It's not occurred if we don't use ``plugin_register``.
1564 * It's not occurred in the process that executes ``plugin_register``.
1565 * It's occurred in the process that doesn't execute ``plugin_register``.
1566
1567 * Fixed a bug that normalization error occurred while static index construction by ``token_column``. [GitHub#1122][Reported by naoa]
1568
1569 Thanks
1570 ^^^^^^
1571
1572 * naoa
1573
1574 .. _release-10-0-4:
1575
1576 Release 10.0.4 - 2020-06-29
1577 ---------------------------
1578
1579 Improvements
1580 ^^^^^^^^^^^^
1581
1582 * [:doc:`/reference/tables`] Added support for registering 400M records into a hash table.
1583
1584 * [:doc:`/reference/commands/select`] Improve scorer performance when the ``_score`` doesn't get recursively values.
1585
1586 * Groonga get recursively value of ``_score`` when search result is search target.
1587 * For example, the search targets of ``slices`` are search result. Therefore, if we use ``slice`` in a query, this improvement doesn't ineffective.
1588
1589 * [:doc:`/reference/log`] Improved that we output drilldown keys in query-log.
1590
1591 * [:doc:`/reference/commands/reference_acquire`], [:doc:`/reference/commands/reference_release`] Added new commands for reference count mode.
1592
1593 * If we need to call multiple ``load`` in a short time, auto close by the reference count mode will degrade performance.
1594 * We can avoid the performance degrading by calling ``/reference_acquire`` before multiple ``load`` and calling ``/reference_release`` after multiple ``load``.
1595 Between ``/reference_acquire`` and ``/reference_release``, auto close is disabled.
1596
1597 * Because ``/reference_acquire`` acquires a reference of target objects.
1598
1599 * We can must call ``/reference_release`` after you finish performance impact operations.
1600 * If we don't call ``/reference_release``, the reference count mode doesn't work.
1601
1602 * [:doc:`/reference/commands/select`] Added support for aggregating multiple groups on one time ``drilldown``.
1603
1604 * We came to be able to calculate sum or arithmetic mean every different multiple groups on one time ``drilldown`` as below.
1605
1606 .. code-block::
1607
1608 table_create Items TABLE_HASH_KEY ShortText
1609 column_create Items price COLUMN_SCALAR UInt32
1610 column_create Items quantity COLUMN_SCALAR UInt32
1611 column_create Items tag COLUMN_SCALAR ShortText
1612
1613 load --table Items
1614 [
1615 {"_key": "Book", "price": 1000, "quantity": 100, "tag": "A"},
1616 {"_key": "Note", "price": 1000, "quantity": 10, "tag": "B"},
1617 {"_key": "Box", "price": 500, "quantity": 15, "tag": "B"},
1618 {"_key": "Pen", "price": 500, "quantity": 12, "tag": "A"},
1619 {"_key": "Food", "price": 500, "quantity": 111, "tag": "C"},
1620 {"_key": "Drink", "price": 300, "quantity": 22, "tag": "B"}
1621 ]
1622
1623 select Items \
1624 --drilldowns[tag].keys tag \
1625 --drilldowns[tag].output_columns _key,_nsubrecs,price_sum,quantity_sum \
1626 --drilldowns[tag].columns[price_sum].stage group \
1627 --drilldowns[tag].columns[price_sum].type UInt32 \
1628 --drilldowns[tag].columns[price_sum].flags COLUMN_SCALAR \
1629 --drilldowns[tag].columns[price_sum].value 'aggregator_sum(price)' \
1630 --drilldowns[tag].columns[quantity_sum].stage group \
1631 --drilldowns[tag].columns[quantity_sum].type UInt32 \
1632 --drilldowns[tag].columns[quantity_sum].flags COLUMN_SCALAR \
1633 --drilldowns[tag].columns[quantity_sum].value 'aggregator_sum(quantity)'
1634 [
1635 [
1636 0,
1637 0.0,
1638 0.0
1639 ],
1640 [
1641 [
1642 [
1643 6
1644 ],
1645 [
1646 [
1647 "_id",
1648 "UInt32"
1649 ],
1650 [
1651 "_key",
1652 "ShortText"
1653 ],
1654 [
1655 "price",
1656 "UInt32"
1657 ],
1658 [
1659 "quantity",
1660 "UInt32"
1661 ],
1662 [
1663 "tag",
1664 "ShortText"
1665 ]
1666 ],
1667 [
1668 1,
1669 "Book",
1670 1000,
1671 100,
1672 "A"
1673 ],
1674 [
1675 2,
1676 "Note",
1677 1000,
1678 10,
1679 "B"
1680 ],
1681 [
1682 3,
1683 "Box",
1684 500,
1685 15,
1686 "B"
1687 ],
1688 [
1689 4,
1690 "Pen",
1691 500,
1692 12,
1693 "A"
1694 ],
1695 [
1696 5,
1697 "Food",
1698 500,
1699 111,
1700 "C"
1701 ],
1702 [
1703 6,
1704 "Drink",
1705 300,
1706 22,
1707 "B"
1708 ]
1709 ],
1710 {
1711 "tag": [
1712 [
1713 3
1714 ],
1715 [
1716 [
1717 "_key",
1718 "ShortText"
1719 ],
1720 [
1721 "_nsubrecs",
1722 "Int32"
1723 ],
1724 [
1725 "price_sum",
1726 "UInt32"
1727 ],
1728 [
1729 "quantity_sum",
1730 "UInt32"
1731 ]
1732 ],
1733 [
1734 "A",
1735 2,
1736 1500,
1737 112
1738 ],
1739 [
1740 "B",
1741 3,
1742 1800,
1743 47
1744 ],
1745 [
1746 "C",
1747 1,
1748 500,
1749 111
1750 ]
1751 ]
1752 }
1753 ]
1754 ]
1755
1756 * [:doc:`/reference/executables/groonga`] Added support for ``--pid-path`` in standalone mode.
1757
1758 * Because ``--pid-path`` had been ignored in standalone mode in before version.
1759
1760 * [:doc:`/reference/commands/io_flush`] Added support for reference count mode.
1761
1762 * [:doc:`/reference/commands/logical_range_filter`], [:doc:`/reference/commands/logical_count`] Added support for reference count mode.
1763
1764 * [:doc:`/reference/executables/groonga-server-http`] We didn't add header after the last chunk.
1765
1766 * Because there is a possibility to exist that the HTTP client ignores header after the last chunk.
1767
1768 * [vector_slice] Added support for a vector that has the value of the ``Float32`` type. [GitHub#1112 patched by naoa]
1769
1770 * Added support for parallel offline index construction using token column.
1771
1772 * We came to be able to construct an offline index on parallel threads from data that are tokenized in advance.
1773
1774 * We can tune parameters of parallel offline construction by the following environment variables
1775
1776 * ``GRN_TOKEN_COLUMN_PARALLEL_CHUNK_SIZE`` : We specify how many records are processed per thread.
1777
1778 * The default value is ``1024`` records.
1779
1780 * ``GRN_TOKEN_COLUMN_PARALLEL_TABLE_SIZE_THRESHOLD`` : We specify how many source records are required for parallel offline construction.
1781
1782 * The default value is ``102400`` records.
1783
1784 * [:doc:`/reference/commands/select`] Improved performance for ``load_table`` on the reference count mode.
1785
1786 Fixes
1787 ^^^^^
1788
1789 * Fixed a bug that the database of Groonga was broken when we search by using the dynamic columns that don't specify a ``--filter`` and stridden over shard.
1790
1791 * Fixed a bug that ``Float32`` type had not displayed on a result of ``schema`` command.
1792
1793 * Fixed a bug that we count in surplus to ``_nsubrecs`` when the reference ``uvector`` hasn't element.
1794
1795 Thanks
1796 ^^^^^^
1797
1798 * naoa
1799
1800 .. _release-10-0-3:
1801
1802 Release 10.0.3 - 2020-05-29
1803 ---------------------------
1804
1805 Improvements
1806 ^^^^^^^^^^^^
1807
1808 * We came to be able to construct an inverted index from data that are tokenized in advance.
1809
1810 * The construct of an index is speeded up from this.
1811 * We need to prepare token column to use this improvement.
1812 * token column is an auto generated value column like an index column.
1813 * token column value is generated from source column value by tokenizing the source column value.
1814
1815 * We can create a token column by setting the source column as below.
1816
1817 .. code-block::
1818
1819 table_create Terms TABLE_PAT_KEY ShortText \
1820 --normalizer NormalizerNFKC121 \
1821 --default_tokenizer TokenNgram
1822
1823 table_create Notes TABLE_NO_KEY
1824 column_create Notes title COLUMN_SCALAR Text
1825
1826 # The last "title" is the source column.
1827 column_create Notes title_terms COLUMN_VECTOR Terms title
1828
1829 * [:doc:`/reference/commands/select`] We came to be able to specify a ``vector`` for the argument of a function.
1830
1831 * For example, ``flags`` options of ``query`` can describe by a ``vector`` as below.
1832
1833 .. code-block::
1834
1835 select \
1836 --table Memos \
1837 --filter 'query("content", "-content:@mroonga", \
1838 { \
1839 "expander": "QueryExpanderTSV", \
1840 "flags": ["ALLOW_LEADING_NOT", "ALLOW_COLUMN"] \
1841 })'
1842
1843 * [:doc:`/reference/commands/select`] Added a new stage ``result_set`` for dynamic columns.
1844
1845 * This stage generates a column into a result set table. Therefore, it is not generated if ``query`` or ``filter`` doesn't exist
1846
1847 * Because if ``query`` or ``filter`` doesn't exist, Groonga doesn't make a result set table.
1848
1849 * We can't use ``_value`` for the stage. The ``result_set`` stage is for storing value by ``score_column``.
1850
1851 * [vector_slice] Added support for weight vector that has weight of ``Float32`` type. [GitHub#1106 patched by naoa]
1852
1853 * [:doc:`/reference/commands/select`] Added support for ``filtered`` stage and ``output`` stage of dynamic columns on drilldowns. [GitHub#1101 patched by naoa][GitHub#1100 patched by naoa]
1854
1855 * We can use ``filtered`` and ``output`` stage of dynamic columns on drilldowns as with ``drilldowns[Label].stage filtered`` and ``drilldowns[Label].stage output``.
1856
1857 * [:doc:`/reference/commands/select`] Added support for ``Float`` type value in aggregating on drilldown.
1858
1859 * We can aggregate max value, min value, and sum value for ``Float`` type value using ``MAX``, ``MIN``, and ``SUM``.
1860
1861 * [:doc:`/reference/functions/query`] [:doc:`/reference/functions/geo_in_rectangle`] [:doc:`/reference/functions/geo_in_circle`] Added a new option ``score_column`` for ``query()``, ``geo_in_rectangle()``, and ``geo_in_circle()``.
1862
1863 * We can store a score value by condition using ``score_column``.
1864 * Normally, Groonga calculate a score by adding scores of all conditions. However, we sometimes want to get a score value by condition.
1865 * For example, if we want to only use how near central coordinate as score as below, we use ``score_column``.
1866
1867 .. code-block::
1868
1869 table_create LandMarks TABLE_NO_KEY
1870 column_create LandMarks name COLUMN_SCALAR ShortText
1871 column_create LandMarks category COLUMN_SCALAR ShortText
1872 column_create LandMarks point COLUMN_SCALAR WGS84GeoPoint
1873
1874 table_create Points TABLE_PAT_KEY WGS84GeoPoint
1875 column_create Points land_mark_index COLUMN_INDEX LandMarks point
1876
1877 load --table LandMarks
1878 [
1879 {"name": "Aries" , "category": "Tower" , "point": "11x11"},
1880 {"name": "Taurus" , "category": "Lighthouse", "point": "9x10" },
1881 {"name": "Gemini" , "category": "Lighthouse", "point": "8x8" },
1882 {"name": "Cancer" , "category": "Tower" , "point": "12x12"},
1883 {"name": "Leo" , "category": "Tower" , "point": "11x13"},
1884 {"name": "Virgo" , "category": "Temple" , "point": "22x10"},
1885 {"name": "Libra" , "category": "Tower" , "point": "14x14"},
1886 {"name": "Scorpio" , "category": "Temple" , "point": "21x9" },
1887 {"name": "Sagittarius", "category": "Temple" , "point": "43x12"},
1888 {"name": "Capricorn" , "category": "Tower" , "point": "33x12"},
1889 {"name": "Aquarius" , "category": "mountain" , "point": "55x11"},
1890 {"name": "Pisces" , "category": "Tower" , "point": "9x9" },
1891 {"name": "Ophiuchus" , "category": "mountain" , "point": "21x21"}
1892 ]
1893
1894 select LandMarks \
1895 --sort_keys 'distance' \
1896 --columns[distance].stage initial \
1897 --columns[distance].type Float \
1898 --columns[distance].flags COLUMN_SCALAR \
1899 --columns[distance].value 0.0 \
1900 --output_columns 'name, category, point, distance, _score' \
1901 --limit -1 \
1902 --filter 'geo_in_circle(point, "11x11", "11x1", {"score_column": distance}) && category == "Tower"'
1903 [
1904 [
1905 0,
1906 1590647445.406149,
1907 0.0002503395080566406
1908 ],
1909 [
1910 [
1911 [
1912 5
1913 ],
1914 [
1915 [
1916 "name",
1917 "ShortText"
1918 ],
1919 [
1920 "category","ShortText"
1921 ],
1922 [
1923 "point",
1924 "WGS84GeoPoint"
1925 ],
1926 [
1927 "distance",
1928 "Float"
1929 ],
1930 [
1931 "_score",
1932 "Int32"
1933 ]
1934 ],
1935 [
1936 "Aries",
1937 "Tower",
1938 "11x11",
1939 0.0,
1940 1
1941 ],
1942 [
1943 "Cancer",
1944 "Tower",
1945 "12x12",
1946 0.0435875803232193,
1947 1
1948 ],
1949 [
1950 "Leo",
1951 "Tower",
1952 "11x13",
1953 0.06164214760065079,
1954 1
1955 ],
1956 [
1957 "Pisces",
1958 "Tower",
1959 "9x9",
1960 0.0871751606464386,
1961 1
1962 ],
1963 [
1964 "Libra",
1965 "Tower",
1966 "14x14",
1967 0.1307627409696579,
1968 1
1969 ]
1970 ]
1971 ]
1972 ]
1973
1974 * The sort by ``_score`` is meaningless in the above example. Because the value of ``_score`` is all ``1`` by ``category == "Tower"``.
1975 However, we can sort distance from central coordinate using ``score_column``.
1976
1977 * [Windows] Groonga came to be able to output backtrace when it occurs error even if it doesn't crash.
1978
1979 * [Windows] Dropped support for old Windows.
1980
1981 * Groonga for Windows come to require Windows 8 (Windows Server 2012) or later from 10.0.3.
1982
1983 * [:doc:`/reference/commands/select`] Improved sort performance when sort keys were mixed referable sort keys and the other sort keys.
1984
1985 * We improved sort performance if mixed referable sort keys and the other and there are referable keys two or more.
1986
1987 * Referable sort keys are sort keys that except below them.
1988
1989 * Compressed columns
1990 * ``_value`` against the result of drilldown that is specified multiple values to the key of drilldown.
1991 * ``_key`` against patricia trie table that has not the key of ``ShortText`` type.
1992 * ``_score``
1993
1994 * The more sort keys that except string, a decrease in the usage of memory for sort.
1995
1996 * [:doc:`/reference/commands/select`] Improved sort performance when sort keys are all referable keys case.
1997
1998 * [:doc:`/reference/commands/select`] Improve scorer performance as a ``_socre = column1*X + column2*Y + ...`` case.
1999
2000 * This optimization effective when there are many ``+`` or ``*`` in ``_score``.
2001 * At the moment, it has only effective against ``+`` and ``*``.
2002
2003 * [:doc:`/reference/commands/select`] Added support for phrase near search.
2004
2005 * We can search phrase by phrase by a near search.
2006
2007 * Query syntax for near phrase search is ``*NP"Phrase1 phrase2 ..."``.
2008 * Script syntax for near phrase search is ``column *NP "phrase1 phrase2 ..."``.
2009
2010 * If the search target phrase includes space, we can search for it by surrounding it with ``"`` as below.
2011
2012 .. code-block::
2013
2014 table_create Entries TABLE_NO_KEY
2015 column_create Entries content COLUMN_SCALAR Text
2016
2017 table_create Terms TABLE_PAT_KEY ShortText \
2018 --default_tokenizer 'TokenNgram("unify_alphabet", false, \
2019 "unify_digit", false)' \
2020 --normalizer NormalizerNFKC121
2021 column_create Terms entries_content COLUMN_INDEX|WITH_POSITION Entries content
2022
2023 load --table Entries
2024 [
2025 {"content": "I started to use Groonga. It's very fast!"},
2026 {"content": "I also started to use Groonga. It's also very fast! Really fast!"}
2027 ]
2028
2029 select Entries --filter 'content *NP "\\"I started\\" \\"use Groonga\\""' --output_columns 'content'
2030 [
2031 [
2032 0,
2033 1590469700.715882,
2034 0.03997230529785156
2035 ],
2036 [
2037 [
2038 [
2039 1
2040 ],
2041 [
2042 [
2043 "content",
2044 "Text"
2045 ]
2046 ],
2047 [
2048 "I started to use Groonga. It's very fast!"
2049 ]
2050 ]
2051 ]
2052 ]
2053
2054 * [:doc:`/reference/columns/vector`] Added support for ``float32`` weight vector.
2055
2056 * We can store weight as ``float32`` instead of ``uint32``.
2057 * We need to add ``WEIGHT_FLOAT32`` flag when execute ``column_create`` to use this feature.
2058
2059 .. code-block::
2060
2061 column_create Records tags COLUMN_VECTOR|WITH_WEIGHT|WEIGHT_FLOAT32 Tags
2062
2063 * However, ``WEIGHT_FLOAT32`` flag isn't available with ``COLUMN_INDEX`` flag for now.
2064
2065 * Added following APIs
2066
2067 * Added ``grn_obj_is_xxx`` functions. For more information as below.
2068
2069 * ``grn_obj_is_weight_vector(grn_ctx *ctx, grn_obj *obj)``
2070
2071 * It returns as a ``bool`` whether the object is a weight vector.
2072
2073 * ``grn_obj_is_uvector(grn_ctx *ctx, grn_obj *obj)``
2074
2075 * It returns as a ``bool`` whether the object is a ``uvector``.
2076
2077 * ``uvector`` is a ``vector`` that size of elements for ``vector`` are fixed.
2078
2079 * ``grn_obj_is_weight_uvector(grn_ctx *ctx, grn_obj *obj)``
2080
2081 * It returns as a ``bool`` whether the object is a weight uvector.
2082
2083 * Added ``grn_type_id_size(grn_ctx *ctx, grn_id id)``.
2084
2085 * It returns the size of Groonga data type as a ``size_t``.
2086
2087 * Added ``grn_selector_data_get_xxx`` functions. For more information as below.
2088
2089 * These functions return selector related data.
2090
2091 * These functions are supposed to call in selector. If they are called except in selector, they return ``NULL``.
2092
2093 * ``grn_selector_data_get(grn_ctx *ctx)``
2094
2095 * It returns all information that relating calling selector as ``grn_selector_data *`` structure.
2096
2097 * ``grn_selector_data_get_selector(grn_ctx *ctx, grn_selector_data *data)``
2098
2099 * It returns selector itself as ``grn_obj *``.
2100
2101 * ``grn_selector_data_get_expr(grn_ctx *ctx, grn_selector_data *data)``
2102
2103 * It returns selector is used ``--filter`` condition and ``--query`` condition as ``grn_obj *``.
2104
2105 * ``grn_selector_data_get_table(grn_ctx *ctx, grn_selector_data *data)``
2106
2107 * It returns target table as ``grn_obj *``
2108
2109 * ``grn_selector_data_get_index(grn_ctx *ctx, grn_selector_data *data)``
2110
2111 * It returns index is used by selector as ``grn_obj *``.
2112
2113 * ``grn_selector_data_get_args(grn_ctx *ctx, grn_selector_data *data, size_t *n_args)``
2114
2115 * It returns arguments of function that called selector as ``grn_obj **``.
2116
2117 * ``grn_selector_data_get_result_set(grn_ctx *ctx, grn_selector_data *data)``
2118
2119 * It returns result table as ``grn_obj *``.
2120
2121 * ``grn_selector_data_get_op(grn_ctx *ctx, grn_selector_data *data)``
2122
2123 * It returns how to perform the set operation on existing result set as ``grn_operator``.
2124
2125 * Added ``grn_plugin_proc_xxx`` functions. For more information as below.
2126
2127 * ``grn_plugin_proc_get_value_operator(grn_ctx *ctx, grn_obj *value, grn_operator default_operator, const char *context)``
2128
2129 * It returns the operator of a query as a ``grn_operator``.
2130
2131 * For example, ``&&`` is returned as a ``GRN_OP_AND``.
2132
2133
2134 * ``grn_plugin_proc_get_value_bool(grn_ctx *ctx, grn_obj *value, bool default_value, const char *tag)``
2135
2136 * It returns the value that is specified ``true`` or ``false`` like ``with_transposition`` argument of the below function as a ``bool`` (``bool`` is the data type of C language).
2137
2138 .. code-block::
2139
2140 fuzzy_search(column, query, {"max_distance": 1, "prefix_length": 0, "max_expansion": 0, "with_transposition": true})
2141
2142 * Added ``grn_proc_options_xxx`` functions. For more information as below.
2143
2144 * ``query()`` only uses them for now.
2145
2146 * ``grn_proc_options_parsev(grn_ctx *ctx, grn_obj *options, const char *tag, const char *name, va_list args)``
2147
2148 * This function execute parse options.
2149 * We had to implement parsing to options ourselves until now, however, we can parse them by just call this function from this version.
2150
2151 * ``grn_proc_options_parse(grn_ctx *ctx, grn_obj *options, const char *tag, const char *name, ...)``
2152
2153 * It calls ``grn_proc_options_parsev()``. Therefore, features of this function same ``grn_proc_options_parsev()``.
2154 * It only differs in the interface compare with ``grn_proc_options_parsev()``.
2155
2156 * Added ``grn_text_printfv(grn_ctx *ctx, grn_obj *bulk, const char *format, va_list args)``
2157
2158 * ``grn_text_vprintf`` is deprecated from 10.0.3. We use ``grn_text_printfv`` instead.
2159
2160 * Added ``grn_type_id_is_float_family(grn_ctx *ctx, grn_id id)``.
2161
2162 * It returns whether ``grn_type_id`` is ``GRN_DB_FLOAT32`` or ``GRN_DB_FLOAT`` or not as a ``bool``.
2163
2164 * Added ``grn_dat_cursor_get_max_n_records(grn_ctx *ctx, grn_dat_cursor *c)``.
2165
2166 * It returns the number of max records the cursor can have as a ``size_t``. (This API is for the DAT table)
2167
2168 * Added ``grn_table_cursor_get_max_n_records(grn_ctx *ctx, grn_table_cursor *cursor)``.
2169
2170 * It returns the number of max records the cursor can have as a ``size_t``.
2171 * It can use against all table type (``TABLE_NO_KEY``, ``TABLE_HASH_KEY``, ``TABLE_DAT_KEY``, and ``TABLE_PAT_KEY``).
2172
2173 * Added ``grn_result_set_add_xxx`` functions. For more information as below.
2174
2175 * ``grn_result_set_add_record(grn_ctx *ctx, grn_hash *result_set, grn_posting *posting, grn_operator op)``
2176
2177 * It adds a record into the table of result sets.
2178 * ``grn_ii_posting_add_float`` is deprecated from 10.0.3. We use ``grn_rset_add_records()`` instead.
2179
2180 * ``grn_result_set_add_table(grn_ctx *ctx, grn_hash *result_set, grn_obj *table, double score, grn_operator op)``
2181
2182 * It adds a table into the result sets.
2183
2184 * ``grn_result_set_add_table_cursor(grn_ctx *ctx, grn_hash *result_set, grn_table_cursor *cursor, double score, grn_operator op)``
2185
2186 * It adds records that a table cursor has into the result sets.
2187
2188 * Added ``grn_vector_copy(grn_ctx *ctx, grn_obj *src, grn_obj *dest)``.
2189
2190 * It copies a ``vector`` object. It returns whether success copy a ``vector`` object.
2191
2192 * Added ``grn_obj_have_source(grn_ctx *ctx, grn_obj *obj)``.
2193
2194 * It returns whether the column has a source column as a ``bool``.
2195
2196 * Added ``grn_obj_is_token_column(grn_ctx *ctx, grn_obj *obj)``.
2197
2198 * It returns whether the column is a token column as a ``bool``.
2199
2200 * Added ``grn_hash_add_table_cursor(grn_ctx *ctx, grn_hash *hash, grn_table_cursor *cursor, double score)``.
2201
2202 * It's for bulk result set insert. It's faster than inserting records by ``grn_ii_posting_add()``.
2203
2204 Fixes
2205 ^^^^^
2206
2207 * Fixed a crash bug if the modules (tokenizers, normalizers, and token filters) are used at the same time from multiple threads.
2208
2209 * Fixed precision of ``Float32`` value when it outputted.
2210
2211 * The precision of it changes to 8-digit to 7-digit from 10.0.3.
2212
2213 * Fixed a bug that Groonga used the wrong cache when the query that just the parameters of dynamic column different was executed. [GitHub#1102 patched by naoa]
2214
2215 Thanks
2216 ^^^^^^
2217
2218 * naoa
2219
2220 .. _release-10-0-2:
2221
2222 Release 10.0.2 - 2020-04-29
2223 ---------------------------
2224
2225 Improvements
2226 ^^^^^^^^^^^^
2227
2228 * Added support for ``uvector`` for ``time_classify_*`` functions. [GitHub#1089][Patched by naoa]
2229
2230 * ``uvector`` is a vector that size of elements for vector are fixed.
2231 * For example, a vector that has values of Time type as elements is a ``uvector``.
2232
2233 * Improve sort performance if sort key that can't refer value with zero-copy is mixed.
2234
2235 * Some sort key (e.g. ``_score``) values can't be referred with zero-copy.
2236 * If there is at least one sort key that can't be referable is included, all sort keys are copied before.
2237 * With this change, we just copy sort keys that can't be referred. Referable sort keys are just referred without a copy.
2238 * However, this change may have performance regression when all sort keys are referable.
2239
2240 * Added support for loading weight vector as a JSON string.
2241
2242 * We can load weight vector as a JSON string as below example.
2243
2244 .. code-block::
2245
2246 table_create Tags TABLE_PAT_KEY ShortText
2247 table_create Data TABLE_NO_KEY
2248 column_create Data tags COLUMN_VECTOR|WITH_WEIGHT Tags
2249 column_create Tags data_tags COLUMN_INDEX|WITH_WEIGHT Data tags
2250 load --table Data
2251 [
2252 {"tags": "{\"fruit\": 10, \"apple\": 100}"},
2253 {"tags": "{\"fruit\": 200}"}
2254 ]
2255
2256 * Added support for ``Float32`` type.
2257
2258 * Groonga already has a ``Float`` type. However, it is double precision floating point number. Therefore if we only use single precision floating point number, it is not efficient.
2259 * We can select more suitable type by adding a ``Float32`` type.
2260
2261 * Added following APIs
2262
2263 * ``grn_obj_unref(grn_ctx *ctx, grn_obj *obj)``
2264
2265 * This API is only used on the reference count mode (The reference count mode is a state of ``GRN_ENABLE_REFERENCE_COUNT=yes``.).
2266
2267 * It calls ``grn_obj_unlink()`` only on the reference count mode. It doesn't do anything except when the reference count mode.
2268 * We useful it when we need only call ``grn_obj_unlink()`` on the reference count mode.
2269 * Because as the following example, we don't write condition that whether the reference count mode or not.
2270
2271 * The example if we don't use ``grn_obj_unref()``.
2272
2273 .. code-block::
2274
2275 if (grn_enable_reference_count) {
2276 grn_obj_unlink(ctx, obj);
2277 }
2278
2279 * The example if we use ``grn_obj_unref()``.
2280
2281 .. code-block::
2282
2283 grn_obj_ubref(ctx, obj);
2284
2285 * ``grn_get_version_major(void)``
2286 * ``grn_get_version_minor(void)``
2287 * ``grn_get_version_micro(void)``
2288
2289 * They return Groonga's major, minor, and micro version numbers as a ``uint32_t``.
2290
2291 * ``grn_posting_get_record_id(grn_ctx *ctx, grn_posting *posting)``
2292 * ``grn_posting_get_section_id(grn_ctx *ctx, grn_posting *posting)``
2293 * ``grn_posting_get_position(grn_ctx *ctx, grn_posting *posting)``
2294 * ``grn_posting_get_tf(grn_ctx *ctx, grn_posting *posting)``
2295 * ``grn_posting_get_weight(grn_ctx *ctx, grn_posting *posting)``
2296 * ``grn_posting_get_weight_float(grn_ctx *ctx, grn_posting *posting)``
2297 * ``grn_posting_get_rest(grn_ctx *ctx, grn_posting *posting)``
2298
2299 * They return information on the posting list.
2300 * These APIs return value as a ``uint32_t`` except ``grn_posting_get_weight_float``.
2301 * ``grn_posting_get_weight_float`` returns value as a ``float``.
2302
2303 * ``grn_posting_get_section_id(grn_ctx *ctx, grn_posting *posting)``
2304
2305 * Section id is the internal representation of the column name.
2306 * If column name store in posting list as a string, it is a large amount of information and it use waste capacity.
2307 * Therefore, Groonga compresses the amount of information and use storage capacity is small by storing column name in the posting list as a number called section id.
2308
2309 * ``grn_posting_get_tf(grn_ctx *ctx, grn_posting *posting)``
2310
2311 * ``tf`` of ``grn_posting_get_tf`` is Term Frequency score.
2312
2313 * ``grn_posting_get_weight_float(grn_ctx *ctx, grn_posting *posting)``
2314
2315 * It returns weight of token as a ``float``.
2316 * We suggest using this API when we get a weight of token after this.
2317
2318 * Because we modify the internal representation of the weight from ``uint32_t`` to ``float`` in the near future.
2319
2320 Fixes
2321 ^^^^^
2322
2323 * Fixed a bug that Groonga for 32bit on GNU/Linux may crash.
2324
2325 * Fixed a bug that unrelated column value may be cleared. [GtiHub#1087][Reported by sutamin]
2326
2327 * Fixed a memory leak when we dumped records with ``dump`` command.
2328
2329 * Fixed a memory leak when we specified invalid value into ``output_columns``.
2330
2331 * Fixed a memory leak when we executed ``snippet`` function.
2332
2333 * Fixed a memory leak when we filled the below conditions.
2334
2335 * If we used dynamic columns on the ``initial`` stage.
2336 * If we used ``slices`` argument with ``select`` command.
2337
2338 * Fixed a memory leak when we deleted tables with ``logical_table_remove``.
2339
2340 * Fixed a memory leak when we use the reference count mode.
2341
2342 * The reference count mode is a ``GRN_ENABLE_REFERENCE_COUNT=yes`` state.
2343 * This mode is experimental. Performance may degrade by this mode.
2344
2345 * Fixed a bug that Groonga too much unlink ``_key`` accessor when we load data for apache arrow format.
2346
2347 Thanks
2348 ^^^^^^
2349
2350 * sutamin
2351
2352 * naoa
2353
2354 .. _release-10-0-1:
2355
2356 Release 10.0.1 - 2020-03-30
2357 ---------------------------
2358
2359 We have been released Groonga 10.0.1.
2360 Because Ubuntu and Windows(VC++ version) package in Groonga 10.0.0 were mistaken.
2361
2362 If we have already used Groonga 10.0.0 for CentOS, Debian, Windows(MinGW version), no problem with continued use it.
2363
2364 Fixes
2365 ^^^^^
2366
2367 * Added a missing runtime(vcruntime140_1.dll) in package for Windows VC++ version.
2368
2369 .. _release-10-0-0:
2370
2371 Release 10.0.0 - 2020-03-29
2372 ---------------------------
2373
2374 Improvements
2375 ^^^^^^^^^^^^
2376
2377 * [httpd] Updated bundled nginx to 1.17.9.
2378
2379 * [httpd] Added support for specifying output type as an extension.
2380
2381 * For example, we can write ``load.json`` instead of ``load?output_type=json``.
2382
2383 * [:doc:`/reference/log`] Outputted a path of opened or closed file into a log of dump level on Linux.
2384
2385 * [:doc:`/reference/log`] Outputted a path of closed file into a log of debug level on Windows.
2386
2387 * Added following API and macros
2388
2389 * ``grn_timeval_from_double(grn_ctx, double)``
2390
2391 * This API converts ``double`` type to ``grn_timeval`` type.
2392 * It returns value of ``grn_timeval`` type.
2393
2394 * ``GRN_TIMEVAL_TO_NSEC(timeval)``
2395
2396 * This macro converts value of ``grn_timeval`` type to nanosecond as the value of ``uint64_t`` type.
2397
2398 * ``GRN_TIME_USEC_TO_SEC(usec)``
2399
2400 * This macro converts microsecond to second.
2401
2402 * Deprecated the following macro.
2403
2404 * ``GRN_OBJ_FORMAT_FIN(grn_ctx, grn_obj_format)``
2405
2406 * We ``grn_obj_format_fin(grn_ctx, grn_obj_format)`` use instead since 10.0.0.
2407
2408 * [:doc:`/reference/commands/logical_range_filter`],[:doc:`/reference/commands/dump`] Added support for stream output.
2409
2410 * This feature requires ``command_version 3`` or later. The header content is outputted after the body content.
2411 * Currently, this feature support only ``dump`` and ``logical_range_filter``.
2412 * ``logical_range_filter`` always returns the output as a stream on ``command_version 3`` or later.
2413 * This feature has the following limitations.
2414
2415 * -1 is only allowed for negative ``limit``
2416 * MessagePack output isn't supported
2417
2418 * We a little changed the response contents of JSON by this modify.
2419
2420 * The key order differs from before versions as below.
2421
2422 * The key order in before versions.
2423
2424 .. code-block::
2425
2426 {
2427 "header": {...},
2428 "body": {...}
2429 }
2430
2431 * The key order in this version(10.0.0).
2432
2433 .. code-block::
2434
2435 {
2436 "body": {...},
2437 "header": {...}
2438 }
2439
2440 * Disabled caches of ``dump`` and ``logical_range_filter`` when they execute on ``command_version 3``.
2441
2442 * Because of ``dump`` and ``logical_range_filter`` on ``command_version 3`` returns stream since 10.0.0, Groonga can not cache the whole response.
2443
2444 * [:doc:`/reference/commands/logical_range_filter`] Added support for outputting response as Apache Arrow format.
2445
2446 * Supported data type as below.
2447
2448 * ``UInt8``
2449 * ``Int8``
2450 * ``UInt16``
2451 * ``Int16``
2452 * ``UInt32``
2453 * ``Int32``
2454 * ``UInt64``
2455 * ``Int64``
2456 * ``Time``
2457 * ``ShortText``
2458 * ``Text``
2459 * ``LongText``
2460 * ``Vector`` of ``Int32``
2461 * ``Reference vector``
2462
2463 * Supported Ubuntu 20.04 (Focal Fossa).
2464
2465 * Dropped Ubuntu 19.04 (Disco Dingo).
2466
2467 * Because this version has been EOL.