Debian Codegraph @

doc/source/news/11.rst

raw
1 News - 11 series
2 ================
3
4 .. _release-11-1-3:
5
6 Release 11.1.3 - 2022-01-29
7 ---------------------------
8
9 Improvements
10 ^^^^^^^^^^^^
11
12 * [:doc:`/reference/functions/snippet`] Added support for using the keyword of 32 or more. [GitHub#1313][Pathched by Takashi Hashida]
13
14 We could not specify the keyword of 32 or more with ``snippet`` until now.
15 However, we can specify the keyword of 32 or more by this improvement as below.
16
17 .. code-block::
18
19 table_create Entries TABLE_NO_KEY
20 column_create Entries content COLUMN_SCALAR ShortText
21
22 load --table Entries
23 [
24 {"content": "Groonga is a fast and accurate full text search engine based on inverted index. One of the characteristics of Groonga is that a newly registered document instantly appears in search results. Also, Groonga allows updates without read locks. These characteristics result in superior performance on real-time applications.\nGroonga is also a column-oriented database management system (DBMS). Compared with well-known row-oriented systems, such as MySQL and PostgreSQL, column-oriented systems are more suited for aggregate queries. Due to this advantage, Groonga can cover weakness of row-oriented systems.\nThe basic functions of Groonga are provided in a C library. Also, libraries for using Groonga in other languages, such as Ruby, are provided by related projects. In addition, groonga-based storage engines are provided for MySQL and PostgreSQL. These libraries and storage engines allow any application to use Groonga. See usage examples."},
25 {"content": "In widely used DBMSs, updates are immediately processed, for example, a newly registered record appears in the result of the next query. In contrast, some full text search engines do not support instant updates, because it is difficult to dynamically update inverted indexes, the underlying data structure.\nGroonga also uses inverted indexes but supports instant updates. In addition, Groonga allows you to search documents even when updating the document collection. Due to these superior characteristics, Groonga is very flexible as a full text search engine. Also, Groonga always shows good performance because it divides a large task, inverted index merging, into smaller tasks."}
26 ]
27
28 select Entries \
29 --output_columns ' \
30 snippet(content, \
31 "groonga", "inverted", "index", "fast", "full", "text", "search", "engine", "registered", "document", \
32 "results", "appears", "also", "system", "libraries", "for", "mysql", "postgresql", "column-oriented", "dbms", \
33 "basic", "ruby", "projects", "storage", "allow", "application", "usage", "sql", "well-known", "real-time", \
34 "weakness", "merging", "performance", "superior", "large", "dynamically", "difficult", "query", "examples", "divides", \
35 { \
36 "default_open_tag": "[", \
37 "default_close_tag": "]", \
38 "width" : 2048 \
39 })'
40 [
41 [
42 0,
43 1643165838.691991,
44 0.0003311634063720703
45 ],
46 [
47 [
48 [
49 2
50 ],
51 [
52 [
53 "snippet",
54 null
55 ]
56 ],
57 [
58 [
59 "[Groonga] is a [fast] and accurate [full] [text] [search] [engine] based on [inverted] [index]. One of the characteristics of [Groonga] is that a newly [registered] [document] instantly [appears] in [search] [results]. [Also], [Groonga] [allow]s updates without read locks. These characteristics result in [superior] [performance] on [real-time] [application]s.\n[Groonga] is [also] a [column-oriented] database management [system] ([DBMS]). Compared with [well-known] row-oriented [system]s, such as [MySQL] and [PostgreSQL], [column-oriented] [system]s are more suited [for] aggregate queries. Due to this advantage, [Groonga] can cover [weakness] of row-oriented [system]s.\nThe [basic] functions of [Groonga] are provided in a C library. [Also], [libraries] [for] using [Groonga] in other languages, such as [Ruby], are provided by related [projects]. In addition, [groonga]-based [storage] [engine]s are provided [for] [MySQL] and [PostgreSQL]. These [libraries] and [storage] [engine]s [allow] any [application] to use [Groonga]. See [usage] [examples]."
60 ]
61 ],
62 [
63 [
64 "In widely used [DBMS]s, updates are immediately processed, [for] example, a newly [registered] record [appears] in the result of the next [query]. In contrast, some [full] [text] [search] [engine]s do not support instant updates, because it is [difficult] to [dynamically] update [inverted] [index]es, the underlying data structure.\n[Groonga] [also] uses [inverted] [index]es but supports instant updates. In addition, [Groonga] [allow]s you to [search] [document]s even when updating the [document] collection. Due to these [superior] characteristics, [Groonga] is very flexible as a [full] [text] [search] [engine]. [Also], [Groonga] always shows good [performance] because it [divides] a [large] task, [inverted] [index] [merging], into smaller tasks."
65 ]
66 ]
67 ]
68 ]
69 ]
70
71 * [:doc:`/reference/normalizers/normalizer_nfkc130`] Added a new option ``remove_symbol``.
72
73 This option removes symbols (e.g. #, !, ", &, %, ...) from the string that the target of normalizing as below.
74
75 .. code-block::
76
77 normalize 'NormalizerNFKC130("remove_symbol", true)' "#This & is %% a pen." WITH_TYPES
78 [
79 [
80 0,
81 1643595008.729597,
82 0.0005540847778320312
83 ],
84 {
85 "normalized": "this is a pen",
86 "types": [
87 "alpha",
88 "alpha",
89 "alpha",
90 "alpha",
91 "others",
92 "others",
93 "alpha",
94 "alpha",
95 "others",
96 "others",
97 "alpha",
98 "others",
99 "alpha",
100 "alpha",
101 "alpha"
102 ],
103 "checks": [
104 ]
105 }
106 ]
107
108 * [:doc:`/install/almalinux`] Added support for AlmaLinux 8 on ARM64.
109
110 * [httpd] Updated bundled nginx to 1.21.5.
111
112 * [Documentation] Fixed a typo in :doc:`/reference/commands/ruby_eval`. [GitHub#1317][Pathched by wi24rd]
113
114 * [:doc:`/install/ubuntu`] Dropped Ubuntu 21.04 (Hirsute Hippo) support.
115
116 * Because Ubuntu 21.04 reached EOL January 20, 2022.
117
118 Fixes
119 ^^^^^
120
121 * [:doc:`/reference/commands/load`] Fixed a crash bug when we load data with specifying a nonexistent column.
122
123 This bug only occurs when we specify ``apache-arrow`` into ``input_type`` as the argument of ``load``.
124
125 * Fixed a bug that the version up of Groonga failed Because the version up of arrow-libs on which Groonga depends. [groonga-talk,540][Reported by Josep Sanz][Gitter,61eaaa306d9ba23328d23ce1][Reported by shibanao4870][GitHub#1316][Reported by Keitaro YOSHIMURA]
126
127 However, if arrow-libs update a major version, this problem reproduces.
128 In this case, we will handle that by rebuilding the Groonga package.
129
130 Known Issues
131 ^^^^^^^^^^^^
132
133 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
134
135 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
136 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
137
138 * ``'content @ "Groonga" *< content @ "Mroonga"'``
139
140 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
141
142 Thanks
143 ^^^^^^
144
145 * Takashi Hashida
146 * wi24rd
147 * Josep Sanz
148 * Keitaro YOSHIMURA
149 * shibanao4870
150
151 .. _release-11-1-1:
152
153 Release 11.1.1 - 2021-12-29
154 ---------------------------
155
156 Improvements
157 ^^^^^^^^^^^^
158
159 * [:doc:`/reference/commands/select`] Added support for near phrase product search.
160
161 This feature is a shortcut of ``'*NP"..." OR *NP"..." OR ...'``.
162 For example, we can use ``*NPP`` instead of the expression that execute multiple
163 ``*NP`` with ``query`` as below.
164
165 .. code-block::
166
167 query ("title * 10 || content",
168 "*NP"a 1 x" OR
169 *NP"a 1 y" OR
170 *NP"a 1 z" OR
171 *NP"a 2 x" OR
172 *NP"a 2 y" OR
173 *NP"a 2 z" OR
174 *NP"a 3 x" OR
175 *NP"a 3 y" OR
176 *NP"a 3 z" OR
177 *NP"b 1 x" OR
178 *NP"b 1 y" OR
179 *NP"b 1 z" OR
180 *NP"b 2 x" OR
181 *NP"b 2 y" OR
182 *NP"b 2 z" OR
183 *NP"b 3 x" OR
184 *NP"b 3 y" OR
185 *NP"b 3 z"")
186
187 We can be written as ``*NPP"(a b) (1 2 3) (x y z)"`` the above expression by this feature.
188 In addition, ``*NPP"(a b) (1 2 3) (x y z)"`` is faster than ``'*NP"..." OR *NP"..." OR ...'``.
189
190 .. code-block::
191
192 query ("title * 10 || content",
193 "*NPP"(a b) (1 2 3) (x y z)"")
194
195 We implements this feature for improving performance near phrase search
196 like ``'*NP"..." OR *NP"..." OR ...'``.
197
198 * [:doc:`/reference/commands/select`] Added support for order near phrase product search.
199
200 This feature is a shortcut of ``'*ONP"..." OR *ONP"..." OR ...'``.
201 For example, we can use ``*ONPP`` instead of the expression that execute multiple
202 ``*ONP`` with ``query`` as below.
203
204 .. code-block::
205
206 query ("title * 10 || content",
207 "*ONP"a 1 x" OR
208 *ONP"a 1 y" OR
209 *ONP"a 1 z" OR
210 *ONP"a 2 x" OR
211 *ONP"a 2 y" OR
212 *ONP"a 2 z" OR
213 *ONP"a 3 x" OR
214 *ONP"a 3 y" OR
215 *ONP"a 3 z" OR
216 *ONP"b 1 x" OR
217 *ONP"b 1 y" OR
218 *ONP"b 1 z" OR
219 *ONP"b 2 x" OR
220 *ONP"b 2 y" OR
221 *ONP"b 2 z" OR
222 *ONP"b 3 x" OR
223 *ONP"b 3 y" OR
224 *ONP"b 3 z"")
225
226 We can be written as ``*ONPP"(a b) (1 2 3) (x y z)"`` the above expression by this feature.
227 In addition, ``*ONPP"(a b) (1 2 3) (x y z)"`` is faster than ``'*ONP"..." OR *ONP"..." OR ...'``.
228
229 .. code-block::
230
231 query ("title * 10 || content",
232 "*ONPP"(a b) (1 2 3) (x y z)"")
233
234 We implements this feature for improving performance near phrase search
235 like ``'*ONP"..." OR *ONP"..." OR ...'``.
236
237 * [:doc:`/reference/commands/request_cancel`] Groonga became easily detects ``request_cancel`` while executing a search.
238
239 Because we added more checks of return code to detect ``request_cancel``.
240
241 * [:doc:`/reference/commands/thread_dump`] Added a new command ``thread_dump``
242
243 Currently, this command works only on Windows.
244
245 We can put a backtrace of all threads into a log as logs of NOTICE level
246 at the time of running this command.
247
248 This feature is useful when we solve a problem such as Groonga doesn't return a response.
249
250 * [:doc:`/install/centos`] Dropped support for CentOS 8.
251
252 Because CentOS 8 will reach EOL at 2021-12-31.
253
254 Fixes
255 ^^^^^
256
257 * Fixed a bug that we can't remove a index column with invalid parameter. [GitHub#1301][Patched by Takashi Hashida]
258
259 * For example, we can't remove a table when we create an invalid index column with ``column_create`` as below.
260
261 .. code-block::
262
263 table_create Statuses TABLE_NO_KEY
264 column_create Statuses start_time COLUMN_SCALAR UInt16
265 column_create Statuses end_time COLUMN_SCALAR UInt16
266
267 table_create Times TABLE_PAT_KEY UInt16
268 column_create Times statuses COLUMN_INDEX Statuses start_time,end_time
269 [
270 [
271 -22,
272 1639037503.16114,
273 0.003981828689575195,
274 "grn_obj_set_info(): GRN_INFO_SOURCE: multi column index must be created with WITH_SECTION flag: <Times.statuses>",
275 [
276 [
277 "grn_obj_set_info_source_validate",
278 "../../groonga/lib/db.c",
279 9605
280 ],
281 [
282 "/tmp/d.grn",
283 6,
284 "column_create Times statuses COLUMN_INDEX Statuses start_time,end_time"
285 ]
286 ]
287 ],
288 false
289 ]
290 table_remove Times
291 [
292 [
293 -22,
294 1639037503.16515,
295 0.0005414485931396484,
296 "[object][remove] column is broken: <Times.statuses>",
297 [
298 [
299 "remove_columns",
300 "../../groonga/lib/db.c",
301 10649
302 ],
303 [
304 "/tmp/d.grn",
305 8,
306 "table_remove Times"
307 ]
308 ]
309 ],
310 false
311 ]
312
313 Known Issues
314 ^^^^^^^^^^^^
315
316 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
317
318 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
319 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
320
321 * ``'content @ "Groonga" *< content @ "Mroonga"'``
322
323 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
324
325 Thanks
326 ^^^^^^
327
328 * Takashi Hashida
329
330 .. _release-11-1-0:
331
332 Release 11.1.0 - 2021-11-29
333 ---------------------------
334
335 Improvements
336 ^^^^^^^^^^^^
337
338 * [:doc:`/reference/commands/load`] Added support for ISO 8601 time format.[GitHub#1228][Patched by Takashi Hashida]
339
340 ``load`` support the following format by this modification.
341
342 * YYYY-MM-ddThh:mm:ss.sZ
343 * YYYY-MM-ddThh:mm:ss.s+10:00
344 * YYYY-MM-ddThh:mm:ss.s-10:00
345
346 We can also use ``t`` and ``z`` characters instead of ``T`` and ``Z`` in this syntax.
347 We can also use ``/`` character instead of ``-`` in this syntax. However, note that this is not an ISO 8601 format.
348 This format is present for compatibility.
349
350 .. code-block::
351
352 plugin_register functions/time
353
354 table_create Logs TABLE_NO_KEY
355 column_create Logs case COLUMN_SCALAR ShortText
356 column_create Logs created_at COLUMN_SCALAR Time
357 column_create Logs created_at_text COLUMN_SCALAR ShortText
358
359 load --table Logs
360 [
361 {"case": "timezone: Z", "created_at": "2000-01-01T10:00:00Z", "created_at_text": "2000-01-01T10:00:00Z"},
362 {"case": "timezone: z", "created_at": "2000-01-01t10:00:00z", "created_at_text": "2000-01-01T10:00:00z"},
363 {"case": "timezone: 00:00", "created_at": "2000-01-01T10:00:00+00:00", "created_at_text": "2000-01-01T10:00:00+00:00"},
364 {"case": "timezone: +01:01", "created_at": "2000-01-01T11:01:00+01:01", "created_at_text": "2000-01-01T11:01:00+01:01"},
365 {"case": "timezone: +11:11", "created_at": "2000-01-01T21:11:00+11:11", "created_at_text": "2000-01-01T21:11:00+11:11"},
366 {"case": "timezone: -01:01", "created_at": "2000-01-01T08:59:00-01:01", "created_at_text": "2000-01-01T08:59:00-01:01"},
367 {"case": "timezone: -11:11", "created_at": "1999-12-31T22:49:00-11:11", "created_at_text": "1999-12-31T22:49:00-11:11"},
368 {"case": "timezone hour threshold: +23:00", "created_at": "2000-01-02T09:00:00+23:00", "created_at_text": "2000-01-02T09:00:00+23:00"},
369 {"case": "timezone minute threshold: +00:59", "created_at": "2000-01-01T10:59:00+00:59", "created_at_text": "2000-01-01T10:59:00+00:59"},
370 {"case": "timezone omitting minute: +01", "created_at": "2000-01-01T11:00:00+01", "created_at_text": "2000-01-01T11:00:00+01"},
371 {"case": "timezone omitting minute: -01", "created_at": "2000-01-01T09:00:00-01", "created_at_text": "2000-01-01T09:00:00-01"},
372 {"case": "timezone: localtime", "created_at": "2000-01-01T19:00:00", "created_at_text": "2000-01-01T19:00:00"},
373 {"case": "compatible: date delimiter: /", "created_at": "2000/01/01T10:00:00Z", "created_at_text": "2000/01/01T10:00:00Z"},
374 {"case": "decimal", "created_at": "2000-01-01T11:01:00.123+01:01", "created_at_text": "2000-01-01T11:01:00.123+01:01"}
375 ]
376
377 select Logs \
378 --limit -1 \
379 --output_columns "case, time_format_iso8601(created_at), created_at_text"
380 [
381 [
382 0,
383 0.0,
384 0.0
385 ],
386 [
387 [
388 [
389 14
390 ],
391 [
392 [
393 "case",
394 "ShortText"
395 ],
396 [
397 "time_format_iso8601",
398 null
399 ],
400 [
401 "created_at_text",
402 "ShortText"
403 ]
404 ],
405 [
406 "timezone: Z",
407 "2000-01-01T19:00:00.000000+09:00",
408 "2000-01-01T10:00:00Z"
409 ],
410 [
411 "timezone: z",
412 "2000-01-01T19:00:00.000000+09:00",
413 "2000-01-01T10:00:00z"
414 ],
415 [
416 "timezone: 00:00",
417 "2000-01-01T19:00:00.000000+09:00",
418 "2000-01-01T10:00:00+00:00"
419 ],
420 [
421 "timezone: +01:01",
422 "2000-01-01T19:00:00.000000+09:00",
423 "2000-01-01T11:01:00+01:01"
424 ],
425 [
426 "timezone: +11:11",
427 "2000-01-01T19:00:00.000000+09:00",
428 "2000-01-01T21:11:00+11:11"
429 ],
430 [
431 "timezone: -01:01",
432 "2000-01-01T19:00:00.000000+09:00",
433 "2000-01-01T08:59:00-01:01"
434 ],
435 [
436 "timezone: -11:11",
437 "2000-01-01T19:00:00.000000+09:00",
438 "1999-12-31T22:49:00-11:11"
439 ],
440 [
441 "timezone hour threshold: +23:00",
442 "2000-01-01T19:00:00.000000+09:00",
443 "2000-01-02T09:00:00+23:00"
444 ],
445 [
446 "timezone minute threshold: +00:59",
447 "2000-01-01T19:00:00.000000+09:00",
448 "2000-01-01T10:59:00+00:59"
449 ],
450 [
451 "timezone omitting minute: +01",
452 "2000-01-01T19:00:00.000000+09:00",
453 "2000-01-01T11:00:00+01"
454 ],
455 [
456 "timezone omitting minute: -01",
457 "2000-01-01T19:00:00.000000+09:00",
458 "2000-01-01T09:00:00-01"
459 ],
460 [
461 "timezone: localtime",
462 "2000-01-01T19:00:00.000000+09:00",
463 "2000-01-01T19:00:00"
464 ],
465 [
466 "compatible: date delimiter: /",
467 "2000-01-01T19:00:00.000000+09:00",
468 "2000/01/01T10:00:00Z"
469 ],
470 [
471 "decimal",
472 "2000-01-01T19:00:00.123000+09:00",
473 "2000-01-01T11:01:00.123+01:01"
474 ]
475 ]
476 ]
477 ]
478
479 * [:doc:`/reference/commands/select`] Added a new ``query_flags`` ``DISABLE_PREFIX_SEARCH``.
480
481 We can use the prefix search operators ``^`` and ``*`` as search keywords
482 by ``DISABLE_PREFIX_SEARCH`` as below.
483
484 This feature is useful if we want to search documents including ``^`` and ``*``.
485
486 .. code-block::
487
488 table_create Users TABLE_PAT_KEY ShortText
489
490 load --table Users
491 [
492 {"_key": "alice"},
493 {"_key": "alan"},
494 {"_key": "ba*"}
495 ]
496
497 select Users \
498 --match_columns "_key" \
499 --query "a*" \
500 --query_flags "DISABLE_PREFIX_SEARCH"
501 [[0,0.0,0.0],[[[1],[["_id","UInt32"],["_key","ShortText"]],[3,"ba*"]]]]
502
503
504 .. code-block::
505
506 table_create Users TABLE_PAT_KEY ShortText
507
508 load --table Users
509 [
510 {"_key": "alice"},
511 {"_key": "alan"},
512 {"_key": "^a"}
513 ]
514
515 select Users \
516 --query "_key:^a" \
517 --query_flags "ALLOW_COLUMN|DISABLE_PREFIX_SEARCH"
518 [[0,0.0,0.0],[[[1],[["_id","UInt32"],["_key","ShortText"]],[3,"^a"]]]]
519
520 * [:doc:`/reference/commands/select`] Added a new ``query_flags`` ``DISABLE_AND_NOT``.
521
522 We can use ``AND NOT`` operators ``-`` as search keywords
523 by ``DISABLE_AND_NOT`` as below.
524
525 This feature is useful if we want to search documents including ``-``.
526
527 .. code-block::
528
529 table_create Users TABLE_PAT_KEY ShortText
530
531 load --table Users
532 [
533 {"_key": "alice"},
534 {"_key": "bob"},
535 {"_key": "cab-"}
536 ]
537
538 select Users --match_columns "_key" --query "b - a" --query_flags "DISABLE_AND_NOT"
539 [[0,0.0,0.0],[[[1],[["_id","UInt32"],["_key","ShortText"]],[3,"cab-"]]]]
540
541 Fixes
542 ^^^^^
543
544 * [The browser based administration tool] Fixed a bug that a search query that is inputted to non-administration mode is sent even if we input checks to the checkbox for the administration mode of a record list. [GitHub#1186][Patched by Takashi Hashida]
545
546 Known Issues
547 ^^^^^^^^^^^^
548
549 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
550
551 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
552 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
553
554 * ``'content @ "Groonga" *< content @ "Mroonga"'``
555
556 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
557
558 Thanks
559 ^^^^^^
560
561 * Takashi Hashida
562
563 .. _release-11-0-9:
564
565 Release 11.0.9 - 2021-11-04
566 ---------------------------
567
568 Improvements
569 ^^^^^^^^^^^^
570
571 * [:doc:`/reference/functions/snippet`] Added a new option ``delimiter_regexp`` for detecting snippet delimiter with regular expression.
572
573 :doc:`/reference/functions/snippet` extracts text around search keywords.
574 We call the text that is extracted by :doc:`/reference/functions/snippet` snippet.
575
576 Normally, :doc:`/reference/functions/snippet` () returns the text of 200 bytes around search keywords.
577 However, :doc:`/reference/functions/snippet` () gives no thought to a delimiter of sentences.
578 The snippet may be composed of multi sentences.
579
580 ``delimiter_regexp`` option is useful if we want to only extract the text of the same sentence as search keywords.
581 For example, we can use ``\.\s*`` to extract only text in the target sentence as below.
582 Note that you need to escape ``\`` in string.
583
584 .. code-block::
585
586 table_create Documents TABLE_NO_KEY
587 column_create Documents content COLUMN_SCALAR Text
588
589 table_create Terms TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto
590 column_create Terms documents_content_index COLUMN_INDEX|WITH_POSITION Documents content
591
592 load --table Documents
593 [
594 ["content"],
595 ["Groonga is a fast and accurate full text search engine based on inverted index. One of the characteristics of groonga is that a newly registered document instantly appears in search results. Also, groonga allows updates without read locks. These characteristics result in superior performance on real-time applications."],
596 ["Groonga is also a column-oriented database management system (DBMS). Compared with well-known row-oriented systems, such as MySQL and PostgreSQL, column-oriented systems are more suited for aggregate queries. Due to this advantage, groonga can cover weakness of row-oriented systems."]
597 ]
598
599 select Documents \
600 --output_columns 'snippet(content, \
601 { \
602 "default_open_tag": "[", \
603 "default_close_tag": "]", \
604 "delimiter_regexp": "\\\\.\\\\s*" \
605 })' \
606 --match_columns content \
607 --query "fast performance"
608 [
609 [
610 0,
611 1337566253.89858,
612 0.000355720520019531
613 ],
614 [
615 [
616 [
617 1
618 ],
619 [
620 [
621 "snippet",
622 null
623 ]
624 ],
625 [
626 [
627 "Groonga is a [fast] and accurate full text search engine based on inverted index",
628 "These characteristics result in superior [performance] on real-time applications"
629 ]
630 ]
631 ]
632 ]
633 ]
634
635 * [:doc:`/reference/window_functions/window_rank`] Added a new function ``window_rank()``.
636
637 * We can calculate a rank that includes a gap of each record.
638 Normally, the rank isn’t incremented when multiple records that are the same order.
639 For example, if values of sort keys are 100, 100, 200 then the ranks of them
640 are 1, 1, 3.
641 The rank of the last record is 3 not 2 because there are two 1 rank records.
642
643 This is similar to :doc:`/reference/window_functions/window_record_number`.
644 However, :doc:`/reference/window_functions/window_record_number` gives no thought to gap.
645
646 .. code-block::
647
648 table_create Points TABLE_NO_KEY
649 column_create Points game COLUMN_SCALAR ShortText
650 column_create Points score COLUMN_SCALAR UInt32
651
652 load --table Points
653 [
654 ["game", "score"],
655 ["game1", 100],
656 ["game1", 200],
657 ["game1", 100],
658 ["game1", 400],
659 ["game2", 150],
660 ["game2", 200],
661 ["game2", 200],
662 ["game2", 200]
663 ]
664
665 select Points \
666 --columns[rank].stage filtered \
667 --columns[rank].value 'window_rank()' \
668 --columns[rank].type UInt32 \
669 --columns[rank].window.sort_keys score \
670 --output_columns 'game, score, rank' \
671 --sort_keys score
672 [
673 [
674 0,
675 1337566253.89858,
676 0.000355720520019531
677 ],
678 [
679 [
680 [
681 8
682 ],
683 [
684 [
685 "game",
686 "ShortText"
687 ],
688 [
689 "score",
690 "UInt32"
691 ],
692 [
693 "rank",
694 "UInt32"
695 ]
696 ],
697 [
698 "game1",
699 100,
700 1
701 ],
702 [
703 "game1",
704 100,
705 1
706 ],
707 [
708 "game2",
709 150,
710 3
711 ],
712 [
713 "game2",
714 200,
715 4
716 ],
717 [
718 "game2",
719 200,
720 4
721 ],
722 [
723 "game1",
724 200,
725 4
726 ],
727 [
728 "game2",
729 200,
730 4
731 ],
732 [
733 "game1",
734 400,
735 8
736 ]
737 ]
738 ]
739 ]
740
741 * [:doc:`/reference/functions/in_values`] Added support for auto cast when we search tables.
742
743 For example, if we load values of ``UInt32`` into a table that a key type is ``UInt64``, Groonga cast the values to ``UInt64`` automatically when we search the table with ``in_values()``. However, ``in_values(_key, 10)`` doesn't work with ``UInt64`` key table. Because 10 is parsed as ``Int32``.
744
745 .. code-block::
746
747 table_create Numbers TABLE_HASH_KEY UInt64
748 load --table Numbers
749 [
750 {"_key": 100},
751 {"_key": 200},
752 {"_key": 300}
753 ]
754
755 select Numbers --output_columns _key --filter 'in_values(_key, 200, 100)' --sortby _id
756 [[0,0.0,0.0],[[[2],[["_key","UInt64"]],[100],[200]]]]
757
758 * [httpd] Updated bundled nginx to 1.21.3.
759
760 * [:doc:`/install/almalinux`] Added support for AlmaLinux 8.
761
762 * [:doc:`/install/ubuntu`] Added support for Ubuntu 21.10 (Impish Indri).
763
764 Fixes
765 ^^^^^
766
767 * Fixed a bug that Groonga doesn't return a response when an error occurred
768 in command (e.g. syntax error in filter).
769
770 * This bug only occurs when we use ``--output_type apache-arrow``.
771
772 Known Issues
773 ^^^^^^^^^^^^
774
775 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
776
777 * [The browser based administration tool] Currently, Groonga has a bug that a search query that is inputted to non-administration mode is sent even if we input checks to the checkbox for the administration mode of a record list.
778
779 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
780 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
781
782 * ``'content @ "Groonga" *< content @ "Mroonga"'``
783
784 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
785
786 .. _release-11-0-7:
787
788 Release 11.0.7 - 2021-09-29
789 ---------------------------
790
791 Improvements
792 ^^^^^^^^^^^^
793
794 * [:doc:`/reference/commands/load`] Added support for casting a string like as "[int, int,...]" to a vector of integer like as [int, int,...].
795
796 For example, Groonga handle as a vector of integer like as [1, -2] even if we load vector of string like as "[1, -2]" as below.
797
798 .. code-block::
799
800 table_create Data TABLE_NO_KEY
801 column_create Data numbers COLUMN_VECTOR Int16
802 table_create Numbers TABLE_PAT_KEY Int16
803 column_create Numbers data_numbers COLUMN_INDEX Data numbers
804
805 load --table Data
806 [
807 {"numbers": "[1, -2]"},
808 {"numbers": "[-3, 4]"}
809 ]
810
811 dump --dump_plugins no --dump_schema no
812 load --table Data
813 [
814 ["_id","numbers"],
815 [1,[1,-2]],
816 [2,[-3,4]]
817 ]
818
819 column_create Numbers data_numbers COLUMN_INDEX Data numbers
820 select Data --filter 'numbers @ -2'
821 [[0,0.0,0.0],[[[1],[["_id","UInt32"],["numbers","Int16"]],[1,[1,-2]]]]]
822
823 This feature supports for the floowings types.
824
825 * Int8
826 * UInt8
827 * Int16
828 * UInt16
829 * Int32
830 * UInt32
831 * Int64
832 * UInt64
833
834 * [:doc:`/reference/commands/load`] Added support for loading a JSON array expressed as a text string as a vector of string.
835
836 For example, Groonga handle as a vector that has two elements like as ["hello", "world"] if we load JSON array expressed as a text string like as "[\"hello\", \"world\"]" as below.
837
838 .. code-block::
839
840 table_create Data TABLE_NO_KEY
841 [[0,0.0,0.0],true]
842 column_create Data strings COLUMN_VECTOR ShortText
843 [[0,0.0,0.0],true]
844 table_create Terms TABLE_PAT_KEY ShortText --normalizer NormalizerNFKC130 --default_tokenizer TokenNgram
845 [[0,0.0,0.0],true]
846 column_create Terms data_strings COLUMN_INDEX Data strings
847 [[0,0.0,0.0],true]
848 load --table Data
849 [
850 {"strings": "[\"Hello\", \"World\"]"},
851 {"strings": "[\"Good-bye\", \"World\"]"}
852 ]
853 [[0,0.0,0.0],2]
854 dump --dump_plugins no --dump_schema no
855 load --table Data
856 [
857 ["_id","strings"],
858 [1,["Hello","World"]],
859 [2,["Good-bye","World"]]
860 ]
861
862 column_create Terms data_strings COLUMN_INDEX Data strings
863 select Data --filter 'strings @ "bye"'
864 [
865 [
866 0,
867 0.0,
868 0.0
869 ],
870 [
871 [
872 [
873 1
874 ],
875 [
876 [
877 "_id",
878 "UInt32"
879 ],
880 [
881 "strings",
882 "ShortText"
883 ]
884 ],
885 [
886 2,
887 [
888 "Good-bye",
889 "World"
890 ]
891 ]
892 ]
893 ]
894 ]
895
896 In before version, Groonga handled as a vector that had one element like as ["[\"hello\", \"world\"]"] if we loaded JSON array expressed as a text string like as "[\"hello\", \"world\"]".
897
898 * [Documentation] Added a documentation about the following items.
899
900 * [:doc:`/reference/commands/column_create`] Added a documentation about ``WEIGHT_FLOAT32`` flag.
901
902 * [:doc:`/reference/normalizers/normalizer_nfkc121`] Added a documentation about ``NormalizerNFKC121``.
903
904 * [:doc:`/reference/normalizers/normalizer_nfkc130`] Added a documentation about ``NormalizerNFKC130``.
905
906 * [:doc:`/reference/normalizers/normalizer_table`] Added a documentation about ``NormalizerTable``.
907
908 * Updated to 3.0.0 that the version of Apache Arrow that Groonga requires. [GitHub#1265][Patched by Takashi Hashida]
909
910 Fixes
911 ^^^^^
912
913 * Fixed a memory leak when we created a table with a tokenizer with invalid option.
914
915 * Fixed a bug that may not add a new entry in Hash table.
916
917 This bug only occurs in Groonga 11.0.6, and it may occur if we quite a lot of add and delete data.
918 If this bug occurs in your environment, you can resolve this problem by executing the following steps.
919
920 1. We upgrade Groonga to 11.0.7 or later from 11.0.6.
921 2. We make a new table that has the same schema as the original table.
922 3. We copy data to the new table from the original table.
923
924 * [Windows] Fixed a resource leak when Groonga fail open a new file caused by out of memory.
925
926 Known Issues
927 ^^^^^^^^^^^^
928
929 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
930
931 * [The browser based administration tool] Currently, Groonga has a bug that a search query that is inputted to non-administration mode is sent even if we input checks to the checkbox for the administration mode of a record list.
932
933 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
934 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
935
936 * ``'content @ "Groonga" *< content @ "Mroonga"'``
937
938 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
939
940 Thanks
941 ^^^^^^
942
943 * Takashi Hashida
944
945 .. _release-11-0-6:
946
947 Release 11.0.6 - 2021-08-29
948 ---------------------------
949
950 .. warning::
951
952 Groonga 11.0.6 has had a bug that may not add a new entry in Hash table.
953
954 We fixed this bug on Groonga 11.0.7. This bug only occurs in Groonga 11.0.6.
955 Therefore, if you were using Groonga 11.0.6, we highly recommended that
956 you use Groonga 11.0.7 or later.
957
958 Improvements
959 ^^^^^^^^^^^^
960
961 * Added support for recovering on crash. (experimental)
962
963 This is a experimental feature. Currently, this feature is still not stable.
964
965 If Groonga crashes, it recovers the database automatically when it opens a database for the first time since the crash. However, This feature can't recover the database automatically in all crash cases.
966 We need to recover the database manually depending on timing even if this feature enables.
967
968 Groonga execute WAL (write ahead log) when this feature is enable.
969 We can dump WAL by the following tools, but currently, users doesn't need to use them.
970
971 * [:doc:`/reference/executables/grndb`] ``dump-wal`` command.
972 * ``dump-wal.rb`` script.
973
974 * [:doc:`/reference/commands/cache_limit`] Groonga remove cache when we execute ``cache_limit 0``. [GitHub#1224][Reported by higchi]
975
976 Groonga stores query cache to internally table.
977 The maximum total size of keys of this table is 4GiB. Because this table is hash table.
978 Therefore, If we execute many huge queries, Groonga may be unable to store query cache, because the maximum total size of keys may be over 4GiB.
979 In such cases, We can clear the table for query cache by using ``cache_limit 0``, and Groonga can store query cache
980
981 Fixes
982 ^^^^^
983
984 * Fixed a bug that Groonga doesn't clear lock when some threads open the same object around the same time.
985
986 If some threads open the same object around the same time, threads except for a thread that executes the opening object at first are waiting for opening the target object.
987 At this time, threads that wait for an opening object take locks, but these locks are not released.
988 Therefore, these locks remain until Groonga's process is restarted in the above case, and a new thread can't also open the object all the time until Groonga's process is restarted.
989
990 However, this bug rarely happens. Because a time of a thread open the object is a very short time.
991
992 * [:doc:`/reference/functions/query_parallel_or`] Fixed a bug that result may be different from the ``query()``.
993
994 For example, If we used ``query("tags || tags2", "beginner man")``, the following record was a match, but if we used ``query_parallel_or("tags || tags2", "beginner man")``, the following record wasn't a match until now.
995
996 * ``{"_key": "Bob", "comment": "Hey!", "tags": ["expert", "man"], "tags2": ["beginner"]}``
997
998 Even if we use ``query_parallel_or("tags || tags2", "beginner man")``, the above record is match by this modification.
999
1000 Known Issues
1001 ^^^^^^^^^^^^
1002
1003 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
1004
1005 * [The browser based administration tool] Currently, Groonga has a bug that a search query that is inputted to non-administration mode is sent even if we input checks to the checkbox for the administration mode of a record list.
1006
1007 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
1008 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
1009
1010 * ``'content @ "Groonga" *< content @ "Mroonga"'``
1011
1012 * Groonga may not return records that should match caused by ``GRN_II_CURSOR_SET_MIN_ENABLE``.
1013
1014 Thanks
1015 ^^^^^^
1016
1017 * higchi
1018
1019 .. _release-11-0-5:
1020
1021 Release 11.0.5 - 2021-07-29
1022 ---------------------------
1023
1024 Improvements
1025 ^^^^^^^^^^^^
1026
1027 * [:doc:`/reference/normalizers`] Added support for multiple normalizers.
1028
1029 We can specify multiple normalizers by ``--normalizers`` option when we create a table since this release.
1030 If we can also specify them by ``--normalizer`` existing option because of compatibility.
1031
1032 We added ``NormalizerTable`` for customizing a normalizer in Groonga 11.0.4.
1033 We can more flexibly behavior of the normalizer by combining ``NormalizerTable`` with existing normalizer.
1034
1035 For example, this feature is useful in the following case.
1036
1037 * Search for a telephone number. However, we import data handwritten by OCR.
1038 If data is handwritten, OCR may misunderstand a number and string(e.g. 5 and S).
1039
1040 The details are as follows.
1041
1042 .. code-block::
1043
1044 table_create Normalizations TABLE_PAT_KEY ShortText
1045 column_create Normalizations normalized COLUMN_SCALAR ShortText
1046 load --table Normalizations
1047 [
1048 {"_key": "s", "normalized": "5"}
1049 ]
1050
1051
1052 table_create Tels TABLE_NO_KEY
1053 column_create Tels tel COLUMN_SCALAR ShortText
1054
1055 table_create TelsIndex TABLE_PAT_KEY ShortText \
1056 --normalizers 'NormalizerNFKC130("unify_hyphen_and_prolonged_sound_mark", true), \
1057 NormalizerTable("column", "Normalizations.normalized")' \
1058 --default_tokenizer 'TokenNgram("loose_symbol", true, "loose_blank", true)'
1059 column_create TelsIndex tel_index COLUMN_INDEX|WITH_SECTION Tels tel
1060
1061 load --table Tels
1062 [
1063 {"tel": "03-4S-1234"}
1064 {"tel": "03-45-9876"}
1065 ]
1066
1067 select --table Tels \
1068 --filter 'tel @ "03-45-1234"'
1069 [
1070 [
1071 0,
1072 1625227424.560146,
1073 0.0001730918884277344
1074 ],
1075 [
1076 [
1077 [
1078 1
1079 ],
1080 [
1081 [
1082 "_id",
1083 "UInt32"
1084 ],
1085 [
1086 "tel",
1087 "ShortText"
1088 ]
1089 ],
1090 [
1091 1,
1092 "03-4S-1234"
1093 ]
1094 ]
1095 ]
1096 ]
1097
1098 Existing normalizers can't meet in such case, but we can meet it by combining ``NormalizerTable`` with existing normalizer since this release.
1099
1100 * [:doc:`/reference/functions/query_parallel_or`][:doc:`/reference/functions/query`] Added support for customizing thresholds for sequential search.
1101
1102 We can customize thresholds in each queries whether to use sequential search by the following options.
1103
1104 * ``{"max_n_enough_filtered_records": xx}``
1105
1106 ``max_n_enough_filtered_records`` specify the number of records.
1107 ``query`` or ``query_parallel_or`` use sequential search when they seems to narrow down until under this number.
1108
1109 * ``{"enough_filtered_ratio": x.x}``
1110
1111 ``enough_filtered_ratio`` specify percentage of total.
1112 ``query`` or ``query_parallel_or`` use sequential search when they seems to narrow down until under this percentage.
1113 For example, if we specify ``{"enough_filtered_ratio": 0.5}``, ``query`` or ``query_parallel_or`` use sequential search when they seems to narrow down until half of the whole.
1114
1115 The details are as follows.
1116
1117 .. code-block::
1118
1119 table_create Products TABLE_NO_KEY
1120 column_create Products name COLUMN_SCALAR ShortText
1121
1122 table_create Terms TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
1123 column_create Terms products_name COLUMN_INDEX Products name
1124
1125 load --table Products
1126 [
1127 ["name"],
1128 ["Groonga"],
1129 ["Mroonga"],
1130 ["Rroonga"],
1131 ["PGroonga"],
1132 ["Ruby"],
1133 ["PostgreSQL"]
1134 ]
1135
1136 select \
1137 --table Products \
1138 --filter 'query("name", "r name:Ruby", {"enough_filtered_ratio": 0.5})'
1139
1140 .. code-block::
1141
1142 table_create Products TABLE_NO_KEY
1143 column_create Products name COLUMN_SCALAR ShortText
1144
1145 table_create Terms TABLE_PAT_KEY ShortText --normalizer NormalizerAuto
1146 column_create Terms products_name COLUMN_INDEX Products name
1147
1148 load --table Products
1149 [
1150 ["name"],
1151 ["Groonga"],
1152 ["Mroonga"],
1153 ["Rroonga"],
1154 ["PGroonga"],
1155 ["Ruby"],
1156 ["PostgreSQL"]
1157 ]
1158
1159 select \
1160 --table Products \
1161 --filter 'query("name", "r name:Ruby", {"max_n_enough_filtered_records": 10})'
1162
1163 * [:doc:`/reference/functions/between`][:doc:`/reference/functions/in_values`] Added support for customizing thresholds for sequential search.
1164
1165 [:doc:`/reference/functions/between`] and [:doc:`/reference/functions/in_values`] have a feature that they switch to sequential search when the target of search records is narrowed down enough.
1166
1167 The value of ``GRN_IN_VALUES_TOO_MANY_INDEX_MATCH_RATIO`` / ``GRN_BETWEEN_TOO_MANY_INDEX_MATCH_RATIO`` is used as threshold whether Groonga execute sequential search or search with indexes in such a case.
1168
1169 This behavior is customized by only the following environment variable until now.
1170
1171 ``in_values()``::
1172
1173 # Don't use auto sequential search
1174 GRN_IN_VALUES_TOO_MANY_INDEX_MATCH_RATIO=-1
1175 # Set threshold to 0.02
1176 GRN_IN_VALUES_TOO_MANY_INDEX_MATCH_RATIO=0.02
1177
1178 ``between()``::
1179
1180 # Don't use auto sequential search
1181 GRN_BETWEEN_TOO_MANY_INDEX_MATCH_RATIO=-1
1182 # Set threshold to 0.02
1183 GRN_BETWEEN_TOO_MANY_INDEX_MATCH_RATIO=0.02
1184
1185 if customize by the environment variable, this threshold applies to all queries, but we can specify it in each query by using this feature.
1186
1187 The details are as follows. We can specify the threshold by using ``{"too_many_index_match_ratio": x.xx}`` option.
1188 The value type of this option is ``double``.
1189
1190 .. code-block::
1191
1192 table_create Memos TABLE_HASH_KEY ShortText
1193 column_create Memos timestamp COLUMN_SCALAR Time
1194
1195 table_create Times TABLE_PAT_KEY Time
1196 column_create Times memos_timestamp COLUMN_INDEX Memos timestamp
1197
1198 load --table Memos
1199 [
1200 {"_key": "001", "timestamp": "2014-11-10 07:25:23"},
1201 {"_key": "002", "timestamp": "2014-11-10 07:25:24"},
1202 {"_key": "003", "timestamp": "2014-11-10 07:25:25"},
1203 {"_key": "004", "timestamp": "2014-11-10 07:25:26"},
1204 {"_key": "005", "timestamp": "2014-11-10 07:25:27"},
1205 {"_key": "006", "timestamp": "2014-11-10 07:25:28"},
1206 {"_key": "007", "timestamp": "2014-11-10 07:25:29"},
1207 {"_key": "008", "timestamp": "2014-11-10 07:25:30"},
1208 {"_key": "009", "timestamp": "2014-11-10 07:25:31"},
1209 {"_key": "010", "timestamp": "2014-11-10 07:25:32"},
1210 {"_key": "011", "timestamp": "2014-11-10 07:25:33"},
1211 {"_key": "012", "timestamp": "2014-11-10 07:25:34"},
1212 {"_key": "013", "timestamp": "2014-11-10 07:25:35"},
1213 {"_key": "014", "timestamp": "2014-11-10 07:25:36"},
1214 {"_key": "015", "timestamp": "2014-11-10 07:25:37"},
1215 {"_key": "016", "timestamp": "2014-11-10 07:25:38"},
1216 {"_key": "017", "timestamp": "2014-11-10 07:25:39"},
1217 {"_key": "018", "timestamp": "2014-11-10 07:25:40"},
1218 {"_key": "019", "timestamp": "2014-11-10 07:25:41"},
1219 {"_key": "020", "timestamp": "2014-11-10 07:25:42"},
1220 {"_key": "021", "timestamp": "2014-11-10 07:25:43"},
1221 {"_key": "022", "timestamp": "2014-11-10 07:25:44"},
1222 {"_key": "023", "timestamp": "2014-11-10 07:25:45"},
1223 {"_key": "024", "timestamp": "2014-11-10 07:25:46"},
1224 {"_key": "025", "timestamp": "2014-11-10 07:25:47"},
1225 {"_key": "026", "timestamp": "2014-11-10 07:25:48"},
1226 {"_key": "027", "timestamp": "2014-11-10 07:25:49"},
1227 {"_key": "028", "timestamp": "2014-11-10 07:25:50"},
1228 {"_key": "029", "timestamp": "2014-11-10 07:25:51"},
1229 {"_key": "030", "timestamp": "2014-11-10 07:25:52"},
1230 {"_key": "031", "timestamp": "2014-11-10 07:25:53"},
1231 {"_key": "032", "timestamp": "2014-11-10 07:25:54"},
1232 {"_key": "033", "timestamp": "2014-11-10 07:25:55"},
1233 {"_key": "034", "timestamp": "2014-11-10 07:25:56"},
1234 {"_key": "035", "timestamp": "2014-11-10 07:25:57"},
1235 {"_key": "036", "timestamp": "2014-11-10 07:25:58"},
1236 {"_key": "037", "timestamp": "2014-11-10 07:25:59"},
1237 {"_key": "038", "timestamp": "2014-11-10 07:26:00"},
1238 {"_key": "039", "timestamp": "2014-11-10 07:26:01"},
1239 {"_key": "040", "timestamp": "2014-11-10 07:26:02"},
1240 {"_key": "041", "timestamp": "2014-11-10 07:26:03"},
1241 {"_key": "042", "timestamp": "2014-11-10 07:26:04"},
1242 {"_key": "043", "timestamp": "2014-11-10 07:26:05"},
1243 {"_key": "044", "timestamp": "2014-11-10 07:26:06"},
1244 {"_key": "045", "timestamp": "2014-11-10 07:26:07"},
1245 {"_key": "046", "timestamp": "2014-11-10 07:26:08"},
1246 {"_key": "047", "timestamp": "2014-11-10 07:26:09"},
1247 {"_key": "048", "timestamp": "2014-11-10 07:26:10"},
1248 {"_key": "049", "timestamp": "2014-11-10 07:26:11"},
1249 {"_key": "050", "timestamp": "2014-11-10 07:26:12"}
1250 ]
1251
1252 select Memos \
1253 --filter '_key == "003" && \
1254 between(timestamp, \
1255 "2014-11-10 07:25:24", \
1256 "include", \
1257 "2014-11-10 07:27:26", \
1258 "exclude", \
1259 {"too_many_index_match_ratio": 0.03})'
1260
1261 .. code-block::
1262
1263 table_create Tags TABLE_HASH_KEY ShortText
1264
1265 table_create Memos TABLE_HASH_KEY ShortText
1266 column_create Memos tag COLUMN_SCALAR Tags
1267
1268 load --table Memos
1269 [
1270 {"_key": "Rroonga is fast!", "tag": "Rroonga"},
1271 {"_key": "Groonga is fast!", "tag": "Groonga"},
1272 {"_key": "Mroonga is fast!", "tag": "Mroonga"},
1273 {"_key": "Groonga sticker!", "tag": "Groonga"},
1274 {"_key": "Groonga is good!", "tag": "Groonga"}
1275 ]
1276
1277 column_create Tags memos_tag COLUMN_INDEX Memos tag
1278
1279 select \
1280 Memos \
1281 --filter '_id >= 3 && \
1282 in_values(tag, \
1283 "Groonga", \
1284 {"too_many_index_match_ratio": 0.7})' \
1285 --output_columns _id,_score,_key,tag
1286
1287 * [:doc:`/reference/functions/between`] Added support for ``GRN_EXPR_OPTIMIZE=yes``.
1288
1289 ``between()`` supported for optimizing the order of evaluation of a conditional expression.
1290
1291 * [:doc:`/reference/functions/query_parallel_or`][:doc:`/reference/functions/query`] Added support for specifying group of match_columns as vector. [GitHub#1238][Patched by naoa]
1292
1293 We can use vector in ``match_columns`` of ``query`` and ``query_parallel_or`` as below.
1294
1295 .. code-block::
1296
1297 table_create Users TABLE_NO_KEY
1298 column_create Users name COLUMN_SCALAR ShortText
1299 column_create Users memo COLUMN_SCALAR ShortText
1300 column_create Users tag COLUMN_SCALAR ShortText
1301
1302 table_create Terms TABLE_PAT_KEY ShortText \
1303 --default_tokenizer TokenNgram \
1304 --normalizer NormalizerNFKC130
1305 column_create Terms name COLUMN_INDEX|WITH_POSITION Users name
1306 column_create Terms memo COLUMN_INDEX|WITH_POSITION Users memo
1307 column_create Terms tag COLUMN_INDEX|WITH_POSITION Users tag
1308
1309 load --table Users
1310 [
1311 {"name": "Alice", "memo": "Groonga user", "tag": "Groonga"},
1312 {"name": "Bob", "memo": "Rroonga user", "tag": "Rroonga"}
1313 ]
1314
1315 select Users \
1316 --output_columns _score,name \
1317 --filter 'query(["name * 100", "memo", "tag * 10"], \
1318 "Alice OR Groonga")'
1319
1320 * [:doc:`/reference/commands/select`] Added support for section and weight in prefix search. [GitHub#1240][Patched by naoa]
1321
1322 We can use multi column index and adjusting score in prefix search.
1323
1324 .. code-block::
1325
1326 table_create Memos TABLE_NO_KEY
1327 column_create Memos title COLUMN_SCALAR ShortText
1328 column_create Memos tags COLUMN_VECTOR ShortText
1329
1330 table_create Terms TABLE_PAT_KEY ShortText
1331 column_create Terms index COLUMN_INDEX|WITH_SECTION Memos title,tags
1332
1333 load --table Memos
1334 [
1335 {"title": "Groonga", "tags": ["Groonga"]},
1336 {"title": "Rroonga", "tags": ["Groonga", "Rroonga", "Ruby"]},
1337 {"title": "Mroonga", "tags": ["Groonga", "Mroonga", "MySQL"]}
1338 ]
1339
1340 select Memos \
1341 --match_columns "Terms.index.title * 2" \
1342 --query 'G*' \
1343 --output_columns title,tags,_score
1344 [
1345 [
1346 0,
1347 0.0,
1348 0.0
1349 ],
1350 [
1351 [
1352 [
1353 1
1354 ],
1355 [
1356 [
1357 "title",
1358 "ShortText"
1359 ],
1360 [
1361 "tags",
1362 "ShortText"
1363 ],
1364 [
1365 "_score",
1366 "Int32"
1367 ]
1368 ],
1369 [
1370 "Groonga",
1371 [
1372 "Groonga"
1373 ],
1374 2
1375 ]
1376 ]
1377 ]
1378 ]
1379
1380 * [:doc:`/reference/executables/grndb`] Added support for closing used object immediately in ``grndb recover``.
1381
1382 We can reduce memory usage by this.
1383 This may decrease performance but it will be acceptable.
1384
1385 Note that ``grndb check`` doesn't close used objects immediately yet.
1386
1387 * [:doc:`/reference/functions/query_parallel_or`][:doc:`/reference/functions/query`] Added support for specifying ``scorer_tf_idf`` in ``match_columns`` as below.
1388
1389 .. code-block::
1390
1391 table_create Tags TABLE_HASH_KEY ShortText
1392
1393 table_create Users TABLE_HASH_KEY ShortText
1394 column_create Users tags COLUMN_VECTOR Tags
1395
1396 load --table Users
1397 [
1398 {"_key": "Alice",
1399 "tags": ["beginner", "active"]},
1400 {"_key": "Bob",
1401 "tags": ["expert", "passive"]},
1402 {"_key": "Chris",
1403 "tags": ["beginner", "passive"]}
1404 ]
1405
1406 column_create Tags users COLUMN_INDEX Users tags
1407
1408 select Users \
1409 --output_columns _key,_score \
1410 --sort_keys _id \
1411 --command_version 3 \
1412 --filter 'query_parallel_or("scorer_tf_idf(tags)", \
1413 "beginner active")'
1414 {
1415 "header": {
1416 "return_code": 0,
1417 "start_time": 0.0,
1418 "elapsed_time": 0.0
1419 },
1420 "body": {
1421 "n_hits": 1,
1422 "columns": [
1423 {
1424 "name": "_key",
1425 "type": "ShortText"
1426 },
1427 {
1428 "name": "_score",
1429 "type": "Float"
1430 }
1431 ],
1432 "records": [
1433 [
1434 "Alice",
1435 2.098612308502197
1436 ]
1437 ]
1438 }
1439 }
1440
1441 * [:doc:`/reference/commands/query_expand`] Added support for weighted increment, decrement, and negative.
1442
1443 We can specify weight against expanded words.
1444
1445 If we want to increment score, we use ``>``.
1446 If we want to decrement score, we use ``<``.
1447
1448 We can specify the quantity of scores as a number. We can also use a negative numbers in it.
1449
1450 .. code-block::
1451
1452 table_create TermExpansions TABLE_NO_KEY
1453 column_create TermExpansions term COLUMN_SCALAR ShortText
1454 column_create TermExpansions expansions COLUMN_VECTOR ShortText
1455
1456 load --table TermExpansions
1457 [
1458 {"term": "Rroonga", "expansions": ["Rroonga", "Ruby Groonga"]}
1459 ]
1460
1461 query_expand TermExpansions "Groonga <-0.2Rroonga Mroonga" \
1462 --term_column term \
1463 --expanded_term_column expansions
1464 [[0,0.0,0.0],"Groonga <-0.2((Rroonga) OR (Ruby Groonga)) Mroonga"]
1465
1466 * [httpd] Updated bundled nginx to 1.21.1.
1467
1468 * Updated bundled Apache Arrow to 5.0.0.
1469
1470 * [:doc:`/install/ubuntu`] Dropped Ubuntu 20.10 (Groovy Gorilla) support.
1471
1472 * Because Ubuntu 20.10 reached EOL July 22, 2021.
1473
1474 Fixes
1475 ^^^^^
1476
1477 * [:doc:`/reference/functions/query_parallel_or`][:doc:`/reference/functions/query`] Fixed a bug that if we specify ``query_options`` and the other options, the other options are ignored.
1478
1479 For example, ``"default_operator": "OR"`` option had been ignored in the following case.
1480
1481 .. code-block::
1482
1483 plugin_register token_filters/stop_word
1484
1485 table_create Memos TABLE_NO_KEY
1486 column_create Memos content COLUMN_SCALAR ShortText
1487
1488 table_create Terms TABLE_PAT_KEY ShortText \
1489 --default_tokenizer TokenBigram \
1490 --normalizer NormalizerAuto \
1491 --token_filters TokenFilterStopWord
1492 column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content
1493 column_create Terms is_stop_word COLUMN_SCALAR Bool
1494
1495 load --table Terms
1496 [
1497 {"_key": "and", "is_stop_word": true}
1498 ]
1499
1500 load --table Memos
1501 [
1502 {"content": "Hello"},
1503 {"content": "Hello and Good-bye"},
1504 {"content": "and"},
1505 {"content": "Good-bye"}
1506 ]
1507
1508 select Memos \
1509 --filter 'query_parallel_or( \
1510 "content", \
1511 "Hello and", \
1512 {"default_operator": "OR", \
1513 "options": {"TokenFilterStopWord.enable": false}})' \
1514 --match_escalation_threshold -1 \
1515 --sort_keys -_score
1516 [
1517 [
1518 0,
1519 0.0,
1520 0.0
1521 ],
1522 [
1523 [
1524 [
1525 1
1526 ],
1527 [
1528 [
1529 "_id",
1530 "UInt32"
1531 ],
1532 [
1533 "content",
1534 "ShortText"
1535 ]
1536 ],
1537 [
1538 2,
1539 "Hello and Good-bye"
1540 ]
1541 ]
1542 ]
1543 ]
1544
1545 Known Issues
1546 ^^^^^^^^^^^^
1547
1548 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
1549
1550 * [The browser based administration tool] Currently, Groonga has a bug that a search query that is inputted to non-administration mode is sent even if we input checks to the checkbox for the administration mode of a record list.
1551
1552 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
1553 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
1554
1555 * ``'content @ "Groonga" *< content @ "Mroonga"'``
1556
1557 * If we repeat that we remove any data and load them again, Groonga may not return records that should match.
1558
1559 Thanks
1560 ^^^^^^
1561
1562 * naoa
1563
1564 .. _release-11-0-4:
1565
1566 Release 11.0.4 - 2021-06-29
1567 ---------------------------
1568
1569 Improvements
1570 ^^^^^^^^^^^^
1571
1572 * [Normalizer] Added support for customized normalizer.
1573
1574 We define a table for normalize to use this feature.
1575 We can normalize with use that table.
1576 In other words, we can use customized normalizer.
1577
1578 For example, we define that "S" normalize to "5" in the following example.
1579 The ``Substitutions`` table is for normalize.
1580
1581 .. code-block::
1582
1583 table_create Substitutions TABLE_PAT_KEY ShortText
1584 column_create Substitutions substituted COLUMN_SCALAR ShortText
1585 load --table Substitutions
1586 [
1587 {"_key": "S", "substituted": "5"}
1588 ]
1589
1590 table_create TelLists TABLE_NO_KEY
1591 column_create TelLists tel COLUMN_SCALAR ShortText
1592
1593 table_create Terms TABLE_HASH_KEY ShortText \
1594 --default_tokenizer TokenNgram \
1595 --normalizer 'NormalizerTable("column", "Substitutions.substituted", \
1596 "report_source_offset", true)'
1597 column_create Terms tel_index COLUMN_INDEX|WITH_POSITION TelLists tel
1598
1599 load --table TelLists
1600 [
1601 {"tel": "03-4S-1234"}
1602 ]
1603
1604 select TelLists --filter 'tel @ "03-45-1234"'
1605 [
1606 [
1607 0,
1608 1624686303.538532,
1609 0.001319169998168945
1610 ],
1611 [
1612 [
1613 [
1614 1
1615 ],
1616 [
1617 [
1618 "_id",
1619 "UInt32"
1620 ],
1621 [
1622 "tel",
1623 "ShortText"
1624 ]
1625 ],
1626 [
1627 1,
1628 "03-4S-1234"
1629 ]
1630 ]
1631 ]
1632 ]
1633
1634 For example, we can define to the table easy to false recognize words when we input a handwritten data.
1635 By this, we can normalize incorrect data to correct data.
1636
1637 Note that we need to reconstruct the index if we updated the table for normalize.
1638
1639 * Added a new command ``object_warm``.
1640
1641 This commnad ship Groonga's DB to OS's page cache.
1642
1643 If we never startup Groonga after OS startup, Groonga's DB doesn't exist on OS's page cache
1644 When Groonga on the first run.
1645 Therefore, the first operation to Groonga is slow.
1646
1647 If we execute this command in advance, the first operation to Groonga is fast.
1648 In Linux, we can do the same by also executing ``cat *.db > dev/null``.
1649 However, we could not do the same thing in Windows until now.
1650
1651 By using this command, we can ship Groonga's DB to OS's page cache in both Linux and Windows.
1652 Then, we can also do that in units of table, column, and index.
1653 Therefore, we can ship only table, column, and index that we often use to OS's page cache.
1654
1655 We can execute this command against various targets as below.
1656
1657 * If we specify ``object_warm --name index_name``, the index is shipped to OS's page cache.
1658 * If we specify ``object_warm --name column_name``, the column is shipped to OS's page cache.
1659 * If we specify ``object_warm --name table_name`` is shipped to OS's page cache.
1660 * If we specify ``object_warm``, whole Groonga's database is shipped to OS's page cache.
1661
1662 However, note that if OS has not empty space on memory, this command has no effect.
1663
1664 * [:doc:`/reference/commands/select`] Added support for adjusting the score of a specific record in ``--filter``.
1665
1666 We can adjust the score of a specific record by using a oprtator named ``*~``.
1667 ``*~`` is logical operator same as ``&&`` and ``||``. Therefore, we can use ``*~`` like as ``&&`` ans ``||``.
1668 Default weight of ``*~`` is -1.
1669
1670 Therefore, for example, ``'content @ "Groonga" *~ content @ "Mroonga"'`` mean the following operations.
1671
1672 1. Extract records that match ``'content @ "Groonga"`` and ``content @ "Mroonga"'``.
1673 2. Add a score as below.
1674
1675 a. Calculate the score of ``'content @ "Groonga"``.
1676 b. Calculate the score of ``'content @ "Mroonga"'``.
1677 c. b's score multiplied by -1 by ``*~``.
1678 d. The socre of this record is a + b
1679 Therefore, if a's socre is 1 and b's score is 1, the score of this record is 1 + (1 * -1) = 0.
1680
1681 Then, we can specify score quantity by ``*~${score_quantity}``.
1682
1683 In particular, the following query adjust the score of match records by the following condition(``'content @ "Groonga" *~2.5 content @ "Mroonga")'`` ).
1684
1685 .. code-block::
1686
1687 table_create Memos TABLE_NO_KEY
1688 column_create Memos content COLUMN_SCALAR ShortText
1689
1690 table_create Terms TABLE_PAT_KEY ShortText \
1691 --default_tokenizer TokenBigram \
1692 --normalizer NormalizerAuto
1693 column_create Terms index COLUMN_INDEX|WITH_POSITION Memos content
1694
1695 load --table Memos
1696 [
1697 {"content": "Groonga is a full text search engine."},
1698 {"content": "Rroonga is the Ruby bindings of Groonga."},
1699 {"content": "Mroonga is a MySQL storage engine based of Groonga."}
1700 ]
1701
1702 select Memos \
1703 --command_version 3 \
1704 --filter 'content @ "Groonga" *~2.5 content @ "Mroonga"' \
1705 --output_columns 'content, _score' \
1706 --sort_keys -_score,_id
1707 {
1708 "header": {
1709 "return_code": 0,
1710 "start_time": 1624605205.641078,
1711 "elapsed_time": 0.002965450286865234
1712 },
1713 "body": {
1714 "n_hits": 3,
1715 "columns": [
1716 {
1717 "name": "content",
1718 "type": "ShortText"
1719 },
1720 {
1721 "name": "_score",
1722 "type": "Float"
1723 }
1724 ],
1725 "records": [
1726 [
1727 "Groonga is a full text search engine.",
1728 1.0
1729 ],
1730 [
1731 "Rroonga is the Ruby bindings of Groonga.",
1732 1.0
1733 ],
1734 [
1735 "Mroonga is a MySQL storage engine based of Groonga.",
1736 -1.5
1737 ]
1738 ]
1739 }
1740 }
1741
1742 We can do the same by also using :ref:`select-adjuster` .
1743 If we use :ref:`select-adjuster` , we need to make ``--filter`` condition and ``--adjuster`` conditon on our application, but we make only ``--filter`` condition on it by this improvement.
1744
1745 We can also describe filter condition as below by using ``query()``.
1746
1747 * ``--filter 'content @ "Groonga" *~2.5 content @ "Mroonga"'``
1748
1749 * [:doc:`/reference/commands/select`] Added support for ``&&`` with weight.
1750
1751 We can use ``&&`` with weight by using ``*<`` or ``*>``.
1752 Default weight of ``*<`` is 0.5. Default weight of ``*>`` is 2.0.
1753
1754 We can specify score quantity by ``*<${score_quantity}`` and ``*>${score_quantity}``.
1755 Then, if we specify ``*<${score_quantity}``, a plus or minus sign of ``${score_quantity}`` is reverse.
1756
1757 For example, ``'content @ "Groonga" *<2.5 query("content", "MySQL")'`` is as below.
1758
1759 1. Extract records that match ``'content @ "Groonga"`` and ``content @ "Mroonga"'``.
1760 2. Add a score as below.
1761
1762 a. Calculate the score of ``'content @ "Groonga"``.
1763 b. Calculate the score of ``query("content", "MySQL")``.
1764 c. b's score multiplied by -2.5 by ``*<``.
1765 d. The socre of this record is a + b
1766 Therefore, if a's socre is 1 and b's score is 1, the score of this record is 1 + (1 * -2.5) = -1.5.
1767
1768 In particular, the following query adjust the score of match records by the following condition( ``'content @ "Groonga" *<2.5 query("content", "Mroonga")'`` ).
1769
1770 .. code-block::
1771
1772 table_create Memos TABLE_NO_KEY
1773 column_create Memos content COLUMN_SCALAR ShortText
1774
1775 table_create Terms TABLE_PAT_KEY ShortText \
1776 --default_tokenizer TokenBigram \
1777 --normalizer NormalizerAuto
1778 column_create Terms index COLUMN_INDEX|WITH_POSITION Memos content
1779
1780 load --table Memos
1781 [
1782 {"content": "Groonga is a full text search engine."},
1783 {"content": "Rroonga is the Ruby bindings of Groonga."},
1784 {"content": "Mroonga is a MySQL storage engine based of Groonga."}
1785 ]
1786
1787 select Memos \
1788 --command_version 3 \
1789 --filter 'content @ "Groonga" *<2.5 query("content", "Mroonga")' \
1790 --output_columns 'content, _score' \
1791 --sort_keys -_score,_id
1792 {
1793 "header": {
1794 "return_code": 0,
1795 "start_time": 1624605205.641078,
1796 "elapsed_time": 0.002965450286865234
1797 },
1798 "body": {
1799 "n_hits": 3,
1800 "columns": [
1801 {
1802 "name": "content",
1803 "type": "ShortText"
1804 },
1805 {
1806 "name": "_score",
1807 "type": "Float"
1808 }
1809 ],
1810 "records": [
1811 [
1812 "Groonga is a full text search engine.",
1813 1.0
1814 ],
1815 [
1816 "Rroonga is the Ruby bindings of Groonga.",
1817 1.0
1818 ],
1819 [
1820 "Mroonga is a MySQL storage engine based of Groonga.",
1821 -1.5
1822 ]
1823 ]
1824 }
1825 }
1826
1827 * [:doc:`/reference/log`] Added support for outputting to stdout and stderr.
1828
1829 [:ref:`process-log`] and [:ref:`query-log`] supported output to stdout and stderr.
1830
1831 * If we specify as ``--log-path -``, ``--query-log-path -``, Groonga output log to stdout.
1832 * If we specify as ``--log-path +``, ``--query-log-path +``, Groonga output log to stderr.
1833
1834 [:ref:`process-log`] is for all of Groonga works.
1835 [:ref:`query-log`] is just for query processing.
1836
1837 This feature is useful when we execute Groonga on Docker.
1838 Docker has the feature that records stdout and stderr in standard.
1839 Therefore, we don't need to login into the environment of Docker to get Groonga's log.
1840
1841 For example, this feature is useful as he following case.
1842
1843 * If we want to analyze slow queries of Groonga on Docker.
1844
1845 If we specify ``--query-log-path -`` when startup Groonga, we can analyze slow queries by only execution the following commands.
1846
1847 * ``docker logs ${container_name} | groonga-query-log-analyze``
1848
1849 By this, we can analyze slow query with the query log that output from Groonga on Docker simply.
1850
1851 * [Documentation] Filled missing documentation of ``string_substring``. [GitHub#1209][Patched by Takashi Hashida]
1852
1853 Known Issues
1854 ^^^^^^^^^^^^
1855
1856 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
1857
1858 * [The browser based administration tool] Currently, Groonga has a bug that a search query that is inputted to non-administration mode is sent even if we input checks to the checkbox for the administration mode of a record list.
1859
1860 * ``*<`` and ``*>`` only valid when we use ``query()`` the right side of filter condition.
1861 If we specify as below, ``*<`` and ``*>`` work as ``&&``.
1862
1863 * ``'content @ "Groonga" *< content @ "Mroonga"'``
1864
1865 Thanks
1866 ^^^^^^
1867
1868 * Takashi Hashida
1869
1870 .. _release-11-0-3:
1871
1872 Release 11.0.3 - 2021-05-29
1873 ---------------------------
1874
1875 Improvements
1876 ^^^^^^^^^^^^
1877
1878 * [:doc:`/reference/functions/query`] Added support for ignoring ``TokenFilterStem`` by the query.
1879
1880 * ``TokenFilterStem`` can search by using a stem.
1881 For example, all of ``develop``, ``developing``, ``developed`` and ``develops`` tokens are stemmed as ``develop``.
1882 So we can find ``develop``, ``developing`` and ``developed`` by ``develops`` query.
1883
1884 * In this release, we are able to search without ``TokenFilterStem`` in only a specific query as below.
1885
1886 .. code-block::
1887
1888 plugin_register token_filters/stem
1889
1890 table_create Memos TABLE_NO_KEY
1891 column_create Memos content COLUMN_SCALAR ShortText
1892
1893 table_create Terms TABLE_PAT_KEY ShortText \
1894 --default_tokenizer TokenBigram \
1895 --normalizer NormalizerAuto \
1896 --token_filters 'TokenFilterStem("keep_original", true)'
1897 column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content
1898
1899 load --table Memos
1900 [
1901 {"content": "I develop Groonga"},
1902 {"content": "I'm developing Groonga"},
1903 {"content": "I developed Groonga"}
1904 ]
1905
1906 select Memos \
1907 --match_columns content \
1908 --query '"developed groonga"' \
1909 --query_options '{"TokenFilterStem.enable": false}'
1910 [
1911 [
1912 0,
1913 0.0,
1914 0.0
1915 ],
1916 [
1917 [
1918 [
1919 1
1920 ],
1921 [
1922 [
1923 "_id",
1924 "UInt32"
1925 ],
1926 [
1927 "content",
1928 "ShortText"
1929 ]
1930 ],
1931 [
1932 3,
1933 "I developed Groonga"
1934 ]
1935 ]
1936 ]
1937 ]
1938
1939 * This feature is useful when users want to search by a stemmed word generally but users sometimes want to search by a exact (not stemmed) word as below.
1940
1941 * If Groonga returns many results when searching by a stemmed word.
1942 * If ``TokenFilterStem`` returns the wrong result of stemming.
1943 * If we want to find only records that have an exact (not stemmed) word.
1944
1945 * [:doc:`/reference/functions/query`] Added support for ignoring ``TokenFilterStopWord`` by the query.
1946
1947 * ``TokenFilterStopWord`` searched without stop word that we registered beforehand.
1948 It uses for reducing noise of search by ignoring frequently word (e.g., ``and``, ``is``, and so on.).
1949 * However, we sometimes want to search include these words only a specific query. In this release, we are able to search without ``TokenFilterStopWord`` in only a specific query as below.
1950
1951 .. code-block::
1952
1953 plugin_register token_filters/stop_word
1954
1955 table_create Memos TABLE_NO_KEY
1956 column_create Memos content COLUMN_SCALAR ShortText
1957
1958 table_create Terms TABLE_PAT_KEY ShortText \
1959 --default_tokenizer TokenBigram \
1960 --normalizer NormalizerAuto \
1961 --token_filters TokenFilterStopWord
1962 column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content
1963 column_create Terms is_stop_word COLUMN_SCALAR Bool
1964
1965 load --table Terms
1966 [
1967 {"_key": "and", "is_stop_word": true}
1968 ]
1969
1970 load --table Memos
1971 [
1972 {"content": "Hello"},
1973 {"content": "Hello and Good-bye"},
1974 {"content": "Good-bye"}
1975 ]
1976
1977 select Memos \
1978 --match_columns content \
1979 --query "Hello and" \
1980 --query_options '{"TokenFilterStopWord.enable": false}' \
1981 --match_escalation_threshold -1 \
1982 --sort_keys -_score
1983 [
1984 [
1985 0,
1986 0.0,
1987 0.0
1988 ],
1989 [
1990 [
1991 [
1992 1
1993 ],
1994 [
1995 [
1996 "_id",
1997 "UInt32"
1998 ],
1999 [
2000 "content",
2001 "ShortText"
2002 ]
2003 ],
2004 [
2005 2,
2006 "Hello and Good-bye"
2007 ]
2008 ]
2009 ]
2010 ]
2011
2012 * In the above example, we specify ``TokenFilterStopWord.enable`` by using ``--query-options``, but we also specify it by using ``{"options": {"TokenFilterStopWord.enable": false}}`` as below.
2013
2014 .. code-block::
2015
2016 plugin_register token_filters/stop_word
2017
2018 table_create Memos TABLE_NO_KEY
2019 column_create Memos content COLUMN_SCALAR ShortText
2020
2021 table_create Terms TABLE_PAT_KEY ShortText \
2022 --default_tokenizer TokenBigram \
2023 --normalizer NormalizerAuto \
2024 --token_filters TokenFilterStopWord
2025 column_create Terms memos_content COLUMN_INDEX|WITH_POSITION Memos content
2026 column_create Terms is_stop_word COLUMN_SCALAR Bool
2027
2028 load --table Terms
2029 [
2030 {"_key": "and", "is_stop_word": true}
2031 ]
2032
2033 load --table Memos
2034 [
2035 {"content": "Hello"},
2036 {"content": "Hello and Good-bye"},
2037 {"content": "Good-bye"}
2038 ]
2039
2040 select Memos \
2041 --filter 'query("content", \
2042 "Hello and", \
2043 {"options": {"TokenFilterStopWord.enable": false}})' \
2044 --match_escalation_threshold -1 \
2045 --sort_keys -_score
2046 [
2047 [
2048 0,
2049 0.0,
2050 0.0
2051 ],
2052 [
2053 [
2054 [
2055 1
2056 ],
2057 [
2058 [
2059 "_id",
2060 "UInt32"
2061 ],
2062 [
2063 "content",
2064 "ShortText"
2065 ]
2066 ],
2067 [
2068 2,
2069 "Hello and Good-bye"
2070 ]
2071 ]
2072 ]
2073 ]
2074
2075 * This feature is useful if that Groonga can't return results correctly if we don't search by keywords include commonly used words (e.g., if a search for a song title, a shop name, and so on.).
2076
2077 * [:doc:`/reference/normalizers`][NormalizerNFKC] Added a new option ``remove_new_line``.
2078
2079 * If we want to normalize the key of a table that stores data, we set a normalizer to it.
2080 However, normally, normalizers remove a new line.
2081 * Groonga can't handle a key that is only a new line.
2082 * We can register data that is only a new line as key by this option.
2083
2084 * [:doc:`/reference/functions/string_slice`] Added a new function ``string_slice()``. [Github#1177][Patched by Takashi Hashida]
2085
2086 * ``string_slice()`` extracts a substring of a string.
2087 * To enable this function, we need to register ``functions/string`` plugin.
2088 * We can use two different extraction methods depending on the arguments as below.
2089
2090 * Extraction by position::
2091
2092 plugin_register functions/string
2093 table_create Memos TABLE_HASH_KEY ShortText
2094
2095 load --table Memos
2096 [
2097 {"_key": "Groonga"}
2098 ]
2099 select Memos --output_columns '_key, string_slice(_key, 2, 3)'
2100 [
2101 [
2102 0,
2103 1337566253.89858,
2104 0.000355720520019531
2105 ],
2106 [
2107 [
2108 [
2109 1
2110 ],
2111 [
2112 [
2113 "_key",
2114 "ShortText"
2115 ],
2116 [
2117 "string_slice",
2118 null
2119 ]
2120 ],
2121 [
2122 "Groonga",
2123 "oon"
2124 ]
2125 ]
2126 ]
2127 ]
2128
2129 * Extraction by regular expression::
2130
2131 plugin_register functions/string
2132 table_create Memos TABLE_HASH_KEY ShortText
2133
2134 load --table Memos
2135 [
2136 {"_key": "Groonga"}
2137 ]
2138 select Memos --output_columns '_key, string_slice(_key, "(Gro+)(.*)", 2)'
2139 [
2140 [p
2141 0,
2142 1337566253.89858,
2143 0.000355720520019531
2144 ],
2145 [
2146 [
2147 [
2148 1
2149 ],
2150 [
2151 [
2152 "_key",
2153 "ShortText"
2154 ],
2155 [
2156 "string_slice",
2157 null
2158 ]
2159 ],
2160 [
2161 "Groonga",
2162 "nga"
2163 ]
2164 ]
2165 ]
2166 ]
2167
2168 * [:doc:`/install/ubuntu`] Dropped support for Ubuntu 16.04 LTS (Xenial Xerus).
2169
2170 * Added EditorConfig for Visual Studio. [GitHub#1191][Patched by Takashi Hashida]
2171
2172 * Most settings are for Visual Studio only.
2173
2174 * [httpd] Updated bundled nginx to 1.20.1.
2175
2176 * Contains security fix of CVE-2021-23017.
2177
2178 Fixes
2179 ^^^^^
2180
2181 * Fixed a bug that Groonga may not have returned a result of a search query if we sent many search queries when tokenizer, normalizer, or token_filters that support options were used.
2182
2183 Known Issues
2184 ^^^^^^^^^^^^
2185
2186 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
2187
2188 * [The browser based administration tool] Currently, Groonga has a bug that a search query that is inputted to non-administration mode is sent even if we input checks to the checkbox for the administration mode of a record list.
2189
2190 Thanks
2191 ^^^^^^
2192
2193 * Takashi Hashida
2194
2195 .. _release-11-0-2:
2196
2197 Release 11.0.2 - 2021-05-10
2198 ---------------------------
2199
2200 Improvements
2201 ^^^^^^^^^^^^
2202
2203 * [Documentation] Removed a reference about ``ruby_load`` command. [GitHub#1172][Patched by Anthony M. Cook]
2204
2205 * Because this command has already deleted.
2206
2207 * [:doc:`/install/debian`] Added support for Debian 11(Bullseye).
2208
2209 * [:doc:`/reference/commands/select`] Added support for ``--post_filter``.
2210
2211 * We can use ``post_filter`` to filter by ``filtered`` stage dynamic columns as below.
2212
2213 .. code-block::
2214
2215 table_create Items TABLE_NO_KEY
2216 column_create Items price COLUMN_SCALAR UInt32
2217
2218 load --table Items
2219 [
2220 {"price": 100},
2221 {"price": 150},
2222 {"price": 200},
2223 {"price": 250},
2224 {"price": 300}
2225 ]
2226
2227 select Items \
2228 --filter "price >= 150" \
2229 --columns[price_with_tax].stage filtered \
2230 --columns[price_with_tax].type UInt32 \
2231 --columns[price_with_tax].flags COLUMN_SCALAR \
2232 --columns[price_with_tax].value "price * 1.1" \
2233 --post_filter "price_with_tax <= 250"
2234 [
2235 [
2236 0,
2237 0.0,
2238 0.0
2239 ],
2240 [
2241 [
2242 [
2243 2
2244 ],
2245 [
2246 [
2247 "_id",
2248 "UInt32"
2249 ],
2250 [
2251 "price_with_tax",
2252 "UInt32"
2253 ],
2254 [
2255 "price",
2256 "UInt32"
2257 ]
2258 ],
2259 [
2260 2,
2261 165,
2262 150
2263 ],
2264 [
2265 3,
2266 220,
2267 200
2268 ]
2269 ]
2270 ]
2271 ]
2272
2273 * [:doc:`/reference/commands/select`] Added support for ``--slices[].post_filter``.
2274
2275 * We can use ``post_filter`` to filter by ``--slices[].filter`` as below.
2276
2277 .. code-block::
2278
2279 table_create Items TABLE_NO_KEY
2280 column_create Items price COLUMN_SCALAR UInt32
2281
2282 load --table Items
2283 [
2284 {"price": 100},
2285 {"price": 200},
2286 {"price": 300},
2287 {"price": 1000},
2288 {"price": 2000},
2289 {"price": 3000}
2290 ]
2291
2292 select Items \
2293 --slices[expensive].filter 'price >= 1000' \
2294 --slices[expensive].post_filter 'price < 3000'
2295 [
2296 [
2297 0,
2298 0.0,
2299 0.0
2300 ],
2301 [
2302 [
2303 [
2304 6
2305 ],
2306 [
2307 [
2308 "_id",
2309 "UInt32"
2310 ],
2311 [
2312 "price",
2313 "UInt32"
2314 ]
2315 ],
2316 [
2317 1,
2318 100
2319 ],
2320 [
2321 2,
2322 200
2323 ],
2324 [
2325 3,
2326 300
2327 ],
2328 [
2329 4,
2330 1000
2331 ],
2332 [
2333 5,
2334 2000
2335 ],
2336 [
2337 6,
2338 3000
2339 ]
2340 ],
2341 {
2342 "expensive": [
2343 [
2344 2
2345 ],
2346 [
2347 [
2348 "_id",
2349 "UInt32"
2350 ],
2351 [
2352 "price",
2353 "UInt32"
2354 ]
2355 ],
2356 [
2357 4,
2358 1000
2359 ],
2360 [
2361 5,
2362 2000
2363 ]
2364 ]
2365 }
2366 ]
2367 ]
2368
2369
2370 * [:doc:`/reference/commands/select`] Added support for describing expression into ``--sort_keys``.
2371
2372 * We can describe the expression into ``--sort_keys``.
2373
2374 * If nonexistent keys into expression as a ``--sort_keys``, they are ignored and outputted warns into a log.
2375
2376 * By this, for example, we can specify a value of an element of ``VECTOR COLUMN`` to ``--sort_keys``. And we can sort a result with it.
2377 * We can sort a result with an element of ``VECTOR COLUMN`` even if the before version by using dynamic column.
2378 However, we can sort a result with an element of ``VECTOR COLUMN`` without using dynamic column by this feature.
2379
2380 .. code-block::
2381
2382 table_create Values TABLE_NO_KEY
2383 column_create Values numbers COLUMN_VECTOR Int32
2384 load --table Values
2385 [
2386 {"numbers": [127, 128, 129]},
2387 {"numbers": [126, 255]},
2388 {"numbers": [128, -254]}
2389 ]
2390 select Values --sort_keys 'numbers[1]' --output_columns numbers
2391 [
2392 [
2393 0,
2394 0.0,
2395 0.0
2396 ],
2397 [
2398 [
2399 [
2400 3
2401 ],
2402 [
2403 [
2404 "numbers",
2405 "Int32"
2406 ]
2407 ],
2408 [
2409 [
2410 128,
2411 -254
2412 ]
2413 ],
2414 [
2415 [
2416 127,
2417 128,
2418 129
2419 ]
2420 ],
2421 [
2422 [
2423 126,
2424 255
2425 ]
2426 ]
2427 ]
2428 ]
2429 ]
2430
2431 * [:doc:`/reference/token_filters`] Added support for multiple token filters with options.
2432
2433 * We can specify multiple token filters with options like ``--token_filters 'TokenFilterStopWord("column", "ignore"), TokenFilterNFKC130("unify_kana", true)'``. [Github#mroonga/mroonga#399][Reported by MASUDA Kazuhiro]
2434
2435 * [:doc:`/reference/functions/query`] Added support a dynamic column of ``result_set`` stage with complex expression.
2436
2437 * Complex expression is that it needs temporary result sets internally like a following expression.
2438
2439 .. code-block::
2440
2441 '(true && query("name * 10", "ali", {"score_column": "ali_score"})) || \
2442 (true && query("name * 2", "li", {"score_column": "li_score"}))'
2443
2444 * In the above expressions, the temporary result sets are used to store the result of evaluating the ``true``.
2445 * Therefore, for example, in the following expression, we can use a value of dynamic column of ``result_set`` stage in expression. Because temporary result sets internally are needless as below expression.
2446
2447 .. code-block::
2448
2449 '(query("name * 10", "ali", {"score_column": "ali_score"})) || \
2450 (query("name * 2", "li", {"score_column": "li_score"}))'
2451
2452 * In this release, for example, we can set a value to ``li_score`` as below. (The value of ``li_score`` had been ``0`` in before version. Because the second expression could not get dynamic column.)
2453
2454 .. code-block::
2455
2456 table_create Users TABLE_NO_KEY
2457 column_create Users name COLUMN_SCALAR ShortText
2458
2459 table_create Lexicon TABLE_HASH_KEY ShortText \
2460 --default_tokenizer TokenBigramSplitSymbolAlphaDigit \
2461 --normalizer NormalizerAuto
2462 column_create Lexicon users_name COLUMN_INDEX|WITH_POSITION Users name
2463
2464 load --table Users
2465 [
2466 {"name": "Alice"},
2467 {"name": "Alisa"},
2468 {"name": "Bob"}
2469 ]
2470
2471 select Users \
2472 --columns[ali_score].stage result_set \
2473 --columns[ali_score].type Float \
2474 --columns[ali_score].flags COLUMN_SCALAR \
2475 --columns[li_score].stage result_set \
2476 --columns[li_score].type Float \
2477 --columns[li_score].flags COLUMN_SCALAR \
2478 --output_columns name,_score,ali_score,li_score \
2479 --filter '(true && query("name * 10", "ali", {"score_column": "ali_score"})) || \
2480 (true && query("name * 2", "li", {"score_column": "li_score"}))'
2481 [
2482 [
2483 0,
2484 0.0,
2485 0.0
2486 ],
2487 [
2488 [
2489 [
2490 2
2491 ],
2492 [
2493 [
2494 "name",
2495 "ShortText"
2496 ],
2497 [
2498 "_score",
2499 "Int32"
2500 ],
2501 [
2502 "ali_score",
2503 "Float"
2504 ],
2505 [
2506 "li_score",
2507 "Float"
2508 ]
2509 ],
2510 [
2511 "Alice",
2512 14,
2513 10.0,
2514 2.0
2515 ],
2516 [
2517 "Alisa",
2518 14,
2519 10.0,
2520 2.0
2521 ]
2522 ]
2523 ]
2524 ]
2525
2526 * We also supported a dynamic vector column of ``result_set`` stage as below.
2527
2528 .. code-block::
2529
2530 table_create Users TABLE_NO_KEY
2531 column_create Users name COLUMN_SCALAR ShortText
2532
2533 table_create Lexicon TABLE_HASH_KEY ShortText \
2534 --default_tokenizer TokenBigramSplitSymbolAlphaDigit \
2535 --normalizer NormalizerAuto
2536 column_create Lexicon users_name COLUMN_INDEX|WITH_POSITION Users name
2537
2538 load --table Users
2539 [
2540 {"name": "Alice"},
2541 {"name": "Alisa"},
2542 {"name": "Bob"}
2543 ]
2544
2545 select Users \
2546 --columns[tags].stage result_set \
2547 --columns[tags].type ShortText \
2548 --columns[tags].flags COLUMN_VECTOR \
2549 --output_columns name,tags \
2550 --filter '(true && query("name", "al", {"tags": ["al"], "tags_column": "tags"})) || \
2551 (true && query("name", "sa", {"tags": ["sa"], "tags_column": "tags"}))'
2552 [
2553 [
2554 0,
2555 0.0,
2556 0.0
2557 ],
2558 [
2559 [
2560 [
2561 2
2562 ],
2563 [
2564 [
2565 "name",
2566 "ShortText"
2567 ],
2568 [
2569 "tags",
2570 "ShortText"
2571 ]
2572 ],
2573 [
2574 "Alice",
2575 [
2576 "al"
2577 ]
2578 ],
2579 [
2580 "Alisa",
2581 [
2582 "al",
2583 "sa"
2584 ]
2585 ]
2586 ]
2587 ]
2588 ]
2589
2590 * If we use a dynamic vector column, the storing values are appended values of each element.
2591
2592 * [:doc:`/install/ubuntu`] Added support for Ubuntu 21.04 (Hirsute Hippo).
2593
2594 * [httpd] Updated bundled nginx to 1.19.10.
2595
2596 Known Issues
2597 ^^^^^^^^^^^^
2598
2599 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
2600
2601 * [The browser based administration tool] Currently, Groonga has a bug that a search query that is inputted to non-administration mode is sent even if we input checks to the checkbox for the administration mode of a record list. [Github#1186][Reported by poti]
2602
2603 Thanks
2604 ^^^^^^
2605
2606 * Anthony M. Cook
2607
2608 * MASUDA Kazuhiro
2609
2610 * poti
2611
2612 .. _release-11-0-1:
2613
2614 Release 11.0.1 - 2021-03-31
2615 ---------------------------
2616
2617 Improvements
2618 ^^^^^^^^^^^^
2619
2620 * [:doc:`/install/debian`] Added support for a ARM64 package.
2621
2622 * [:doc:`/reference/commands/select`] Added support for customizing adjust weight every key word.
2623
2624 * We need to specify ``<`` or ``>`` to all keywords to adjust scores until now.
2625 Because the default adjustment of weight (6 or 4) is larger than the default score (1).
2626
2627 * Therefore, for example, "A"'s weight is 1 and "B"'s weight is 4 in ``A <B``.
2628 Decremented "B"'s weight (4) is larger than not decremented "A"'s weight (1).
2629 This is not works as expected.
2630 we need to specify ``>A <B`` to use smaller weight than "A" for "B".
2631 "A"'s weight is 6 and "B"'s weight is 4 in ``>A <B``.
2632
2633 * We can customize adjustment of weight every key word by only specifying ``<${WEIGHT}`` or ``>${WEIGHT}`` to target keywords since this release.
2634 For example, "A"'s weight is 1 and "B"'s weight is 0.9 in ``A <0.1B`` ("B"'s weight decrement 0.1).
2635
2636 * However, note that these forms ( ``>${WEIGHT}...``, ``<${WEIGHT}...``, and ``~${WEIGHT}...`` ) are incompatible.
2637
2638 * [:doc:`/reference/commands/select`] Added support for outputting ``Float`` and ``Float32`` value in Apache Arrow format.
2639
2640 * For example, Groonga output as below.
2641
2642 .. code-block::
2643
2644 table_create Data TABLE_NO_KEY
2645 column_create Data float COLUMN_SCALAR Float
2646
2647 load --table Data
2648 [
2649 {"float": 1.1}
2650 ]
2651
2652 select Data \
2653 --command_version 3 \
2654 --output_type apache-arrow
2655
2656 return_code: int32
2657 start_time: timestamp[ns]
2658 elapsed_time: double
2659 -- metadata --
2660 GROONGA:data_type: metadata
2661 return_code start_time elapsed_time
2662 0 0 1970-01-01T09:00:00+09:00 0.000000
2663 ========================================
2664 _id: uint32
2665 float: double
2666 -- metadata --
2667 GROONGA:n_hits: 1
2668 _id float
2669 0 1 1.100000
2670
2671 * [:doc:`/reference/commands/select`] Added support for getting a reference destination data via index column when we output a result.
2672
2673 * Until now, Groonga had returned involuntary value when we specified output value like ``index_column.xxx``.
2674 For example, A value of ``--columns[tags].value purchases.tag`` was ``["apple",["many"]],["banana",["man"]],["cacao",["man"]]`` in the following example. In this case, the expected values was ``["apple",["man","many"]],["banana",["man"]],["cacao",["woman"]]``.
2675 In this release, we can get a correct reference destination data via index column as below.
2676
2677 .. code-block::
2678
2679 table_create Products TABLE_PAT_KEY ShortText
2680
2681 table_create Purchases TABLE_NO_KEY
2682 column_create Purchases product COLUMN_SCALAR Products
2683 column_create Purchases tag COLUMN_SCALAR ShortText
2684
2685 column_create Products purchases COLUMN_INDEX Purchases product
2686
2687 load --table Products
2688 [
2689 {"_key": "apple"},
2690 {"_key": "banana"},
2691 {"_key": "cacao"}
2692 ]
2693
2694 load --table Purchases
2695 [
2696 {"product": "apple", "tag": "man"},
2697 {"product": "banana", "tag": "man"},
2698 {"product": "cacao", "tag": "woman"},
2699 {"product": "apple", "tag": "many"}
2700 ]
2701
2702 select Products \
2703 --columns[tags].stage output \
2704 --columns[tags].flags COLUMN_VECTOR \
2705 --columns[tags].type ShortText \
2706 --columns[tags].value purchases.tag \
2707 --output_columns _key,tags
2708 [
2709 [
2710 0,
2711 0.0,
2712 0.0
2713 ],
2714 [
2715 [
2716 [
2717 3
2718 ],
2719 [
2720 [
2721 "_key",
2722 "ShortText"
2723 ],
2724 [
2725 "tags",
2726 "ShortText"
2727 ]
2728 ],
2729 [
2730 "apple",
2731 [
2732 "man",
2733 "many"
2734 ]
2735 ],
2736 [
2737 "banana",
2738 [
2739 "man"
2740 ]
2741 ],
2742 [
2743 "cacao",
2744 [
2745 "woman"
2746 ]
2747 ]
2748 ]
2749 ]
2750 ]
2751
2752 * [:doc:`/reference/commands/select`] Added support for specifying index column directly as a part of nested index.
2753
2754 * We can search source table after filtering by using ``index_column.except_source_column``.
2755 For example, we specify ``comments.content`` when searching in the following example.
2756 In this case, at first, this query execute full text search from ``content`` column of ``Comments`` table, then fetch the records of Articles table which refers to already searched records of Comments table.
2757
2758 .. code-block::
2759
2760 table_create Articles TABLE_HASH_KEY ShortText
2761
2762 table_create Comments TABLE_NO_KEY
2763 column_create Comments article COLUMN_SCALAR Articles
2764 column_create Comments content COLUMN_SCALAR ShortText
2765
2766 column_create Articles content COLUMN_SCALAR Text
2767 column_create Articles comments COLUMN_INDEX Comments article
2768
2769 table_create Terms TABLE_PAT_KEY ShortText \
2770 --default_tokenizer TokenBigram \
2771 --normalizer NormalizerNFKC130
2772 column_create Terms articles_content COLUMN_INDEX|WITH_POSITION \
2773 Articles content
2774 column_create Terms comments_content COLUMN_INDEX|WITH_POSITION \
2775 Comments content
2776
2777 load --table Articles
2778 [
2779 {"_key": "article-1", "content": "Groonga is fast!"},
2780 {"_key": "article-2", "content": "Groonga is useful!"},
2781 {"_key": "article-3", "content": "Mroonga is fast!"}
2782 ]
2783
2784 load --table Comments
2785 [
2786 {"article": "article-1", "content": "I'm using Groonga too!"},
2787 {"article": "article-3", "content": "I'm using Mroonga!"},
2788 {"article": "article-1", "content": "I'm using PGroonga!"}
2789 ]
2790
2791 select Articles --match_columns comments.content --query groonga \
2792 --output_columns "_key, _score, comments.content
2793 [
2794 [
2795 0,
2796 0.0,
2797 0.0
2798 ],
2799 [
2800 [
2801 [
2802 1
2803 ],
2804 [
2805 [
2806 "_key",
2807 "ShortText"
2808 ],
2809 [
2810 "_score",
2811 "Int32"
2812 ],
2813 [
2814 "comments.content",
2815 "ShortText"
2816 ]
2817 ],
2818 [
2819 "article-1",
2820 1,
2821 [
2822 "I'm using Groonga too!",
2823 "I'm using PGroonga!"
2824 ]
2825 ]
2826 ]
2827 ]
2828 ]
2829
2830 * [:doc:`/reference/commands/load`] Added support for loading reference vector with inline object literal.
2831
2832 * For example, we can load data like ``"key" : "[ { "key" : "value", ..., "key" : "value" } ]"`` as below.
2833
2834 .. code-block::
2835
2836 table_create Purchases TABLE_NO_KEY
2837 column_create Purchases item COLUMN_SCALAR ShortText
2838 column_create Purchases price COLUMN_SCALAR UInt32
2839
2840 table_create Settlements TABLE_HASH_KEY ShortText
2841 column_create Settlements purchases COLUMN_VECTOR Purchases
2842 column_create Purchases settlements_purchases COLUMN_INDEX Settlements purchases
2843
2844 load --table Settlements
2845 [
2846 {
2847 "_key": "super market",
2848 "purchases": [
2849 {"item": "apple", "price": 100},
2850 {"item": "milk", "price": 200}
2851 ]
2852 },
2853 {
2854 "_key": "shoes shop",
2855 "purchases": [
2856 {"item": "sneakers", "price": 3000}
2857 ]
2858 }
2859 ]
2860
2861 * It makes easier to add JSON data into reference columns by this feature.
2862 * Currently, this feature only support with JSON input.
2863
2864 * [:doc:`/reference/commands/load`] Added support for loading reference vector from JSON text.
2865
2866 * We can load data to reference vector from source table with JSON text as below.
2867
2868 .. code-block::
2869
2870 table_create Purchases TABLE_HASH_KEY ShortText
2871 column_create Purchases item COLUMN_SCALAR ShortText
2872 column_create Purchases price COLUMN_SCALAR UInt32
2873
2874 table_create Settlements TABLE_HASH_KEY ShortText
2875 column_create Settlements purchases COLUMN_VECTOR Purchases
2876
2877 column_create Purchases settlements_purchases COLUMN_INDEX Settlements purchases
2878
2879 load --table Settlements
2880 [
2881 {
2882 "_key": "super market",
2883 "purchases": "[{\"_key\": \"super market-1\", \"item\": \"apple\", \"price\": 100}, {\"_key\": \"super market-2\", \"item\": \"milk\", \"price\": 200}]"
2884 },
2885 {
2886 "_key": "shoes shop",
2887 "purchases": "[{\"_key\": \"shoes shop-1\", \"item\": \"sneakers\", \"price\": 3000}]"
2888 }
2889 ]
2890
2891 dump \
2892 --dump_plugins no \
2893 --dump_schema no
2894 load --table Purchases
2895 [
2896 ["_key","item","price"],
2897 ["super market-1","apple",100],
2898 ["super market-2","milk",200],
2899 ["shoes shop-1","sneakers",3000]
2900 ]
2901
2902 load --table Settlements
2903 [
2904 ["_key","purchases"],
2905 ["super market",["super market-1","super market-2"]],
2906 ["shoes shop",["shoes shop-1"]]
2907 ]
2908
2909 column_create Purchases settlements_purchases COLUMN_INDEX Settlements purchases
2910
2911 * Currently, this feature doesn't support nested reference record.
2912
2913 * [Windows] Added support for UNIX epoch for ``time_classify_*`` functions.
2914
2915 * Groonga handles timestamps on local time. Therefore, for example, if we input the UNIX epoch in Japan, inputting time is 9 hours behind the UNIX epoch.
2916
2917 * The Windows API outputs an error when we input the time before the UNIX epoch.
2918
2919 * We can use the UNIX epoch in ``time_classify_*`` functions as below in this release.
2920
2921 .. code-block::
2922
2923 plugin_register functions/time
2924
2925 table_create Timestamps TABLE_PAT_KEY Time
2926 load --table Timestamps
2927 [
2928 {"_key": 0},
2929 {"_key": "2016-05-06 00:00:00.000001"},
2930 {"_key": "2016-05-06 23:59:59.999999"},
2931 {"_key": "2016-05-07 00:00:00.000000"},
2932 {"_key": "2016-05-07 00:00:00.000001"},
2933 {"_key": "2016-05-08 23:59:59.999999"},
2934 {"_key": "2016-05-08 00:00:00.000000"}
2935 ]
2936
2937 select Timestamps \
2938 --sortby _id \
2939 --limit -1 \
2940 --output_columns '_key, time_classify_day_of_week(_key)'
2941 [
2942 [
2943 0,
2944 0.0,
2945 0.0
2946 ],
2947 [
2948 [
2949 [
2950 7
2951 ],
2952 [
2953 [
2954 "_key",
2955 "Time"
2956 ],
2957 [
2958 "time_classify_day_of_week",
2959 null
2960 ]
2961 ],
2962 [
2963 0.0,
2964 4
2965 ],
2966 [
2967 1462460400.000001,
2968 5
2969 ],
2970 [
2971 1462546799.999999,
2972 5
2973 ],
2974 [
2975 1462546800.0,
2976 6
2977 ],
2978 [
2979 1462546800.000001,
2980 6
2981 ],
2982 [
2983 1462719599.999999,
2984 0
2985 ],
2986 [
2987 1462633200.0,
2988 0
2989 ]
2990 ]
2991 ]
2992 ]
2993
2994 * [:doc:`/reference/functions/query_parallel_or`] Added a new function for processing queries in parallel.
2995
2996 * ``query_parallel_or`` requires Apache Arrow for processing queries in parallel.
2997 If it does not enable, ``query_parallel_or`` processes queries in sequence.
2998
2999 * ``query_parallel_or`` processes combination of ``match_columns`` and ``query_string`` in parallel.
3000
3001 * Syntax of ``query_parallel_or`` is as follow::
3002
3003 query_parallel_or(match_columns, query_string1,
3004 query_string2,
3005 .
3006 .
3007 .
3008 query_stringN,
3009 {"option": "value", ...})
3010
3011 * [:doc:`/reference/commands/select`] Added support for ignoring nonexistent sort keys.
3012
3013 * Groonga had been outputted error when we specified nonexistent sort keys until now.
3014 However, Groonga ignore nonexistent sort keys since this release. (Groonga doesn't output error.)
3015 * This feature implements for consistency.
3016 Because we just ignore invalid values in ``output_columns`` and most of invalid values in ``sort_keys``.
3017
3018 * [:doc:`/reference/commands/select`] Added support for ignoring nonexistent tables in ``drilldowns[].table``. [GitHub#1169][Reported by naoa]
3019
3020 * Groonga had been outputted error when we specified nonexistent tables in ``drilldowns[].table`` until now.
3021 However, Groonga ignore nonexistent tables in ``drilldowns[].table`` since this release. (Groonga doesn't output error.)
3022 * This feature implements for consistency.
3023 Because we just ignore invalid values in ``output_columns`` and most of invalid values in ``sort_keys``.
3024
3025 * [httpd] Updated bundled nginx to 1.19.8.
3026
3027 Fixes
3028 ^^^^^
3029
3030 * [:doc:`/reference/commands/reference_acquire`] Fixed a bug that Groonga crash when a table's reference is acquired and a column is added to the table before auto release is happened.
3031
3032 * Because the added column's reference isn't acquired but it's released on auto release.
3033
3034 * [Windows] Fixed a bug that one or more processes fail an output backtrace on SEGV when a new backtrace logging process starts when another backtrace logging process is running in another thread.
3035
3036
3037 Known Issues
3038 ^^^^^^^^^^^^
3039
3040 * Currently, Groonga has a bug that there is possible that data is corrupt when we execute many additions, delete, and update data to vector column.
3041
3042 Thanks
3043 ^^^^^^
3044
3045 * naoa
3046
3047 .. _release-11-0-0:
3048
3049 Release 11.0.0 - 2021-02-09
3050 ---------------------------
3051
3052 This is a major version up! But It keeps backward compatibility. We can upgrade to 11.0.0 without rebuilding database.
3053
3054 Improvements
3055 ^^^^^^^^^^^^
3056
3057 * [:doc:`/reference/commands/select`] Added support for outputting values of scalar column and vector column via nested index.
3058
3059 * The nested index is that has structure as below.
3060
3061 .. code-block::
3062
3063 table_create Products TABLE_PAT_KEY ShortText
3064
3065 table_create Purchases TABLE_NO_KEY
3066 column_create Purchases product COLUMN_SCALAR Products
3067 column_create Purchases tag COLUMN_SCALAR ShortText
3068
3069 column_create Products purchases COLUMN_INDEX Purchases product
3070
3071 * The ``Products.purchases`` column is a index of ``Purchases.product`` column in the above example.
3072 Also, ``Purchases.product`` is a reference to ``Products`` table.
3073
3074 * We had not got the correct search result when we search via nested index until now.
3075 * The result had been as follows until now. We can see that ``{"product": "apple", "tag": "man"}`` is not output.
3076
3077 .. code-block::
3078
3079 table_create Products TABLE_PAT_KEY ShortText
3080
3081 table_create Purchases TABLE_NO_KEY
3082 column_create Purchases product COLUMN_SCALAR Products
3083 column_create Purchases tag COLUMN_SCALAR ShortText
3084
3085 column_create Products purchases COLUMN_INDEX Purchases product
3086
3087 load --table Products
3088 [
3089 {"_key": "apple"},
3090 {"_key": "banana"},
3091 {"_key": "cacao"}
3092 ]
3093
3094 load --table Purchases
3095 [
3096 {"product": "apple", "tag": "man"},
3097 {"product": "banana", "tag": "man"},
3098 {"product": "cacao", "tag": "woman"},
3099 {"product": "apple", "tag": "many"}
3100 ]
3101
3102 select Products \
3103 --output_columns _key,purchases.tag
3104 [
3105 [
3106 0,
3107 1612504193.380738,
3108 0.0002026557922363281
3109 ],
3110 [
3111 [
3112 [
3113 3
3114 ],
3115 [
3116 [
3117 "_key",
3118 "ShortText"
3119 ],
3120 [
3121 "purchases.tag",
3122 "ShortText"
3123 ]
3124 ],
3125 [
3126 "apple",
3127 "many"
3128 ],
3129 [
3130 "banana",
3131 "man"
3132 ],
3133 [
3134 "cacao",
3135 "man"
3136 ]
3137 ]
3138 ]
3139 ]
3140
3141 * The result will be as follows from this release. We can see that ``{"product": "apple", "tag": "man"}`` is output.
3142
3143 .. code-block::
3144
3145 select Products \
3146 --output_columns _key,purchases.tag
3147 [
3148 [
3149 0,
3150 0.0,
3151 0.0
3152 ],
3153 [
3154 [
3155 [
3156 3
3157 ],
3158 [
3159 [
3160 "_key",
3161 "ShortText"
3162 ],
3163 [
3164 "purchases.tags",
3165 "Tags"
3166 ]
3167 ],
3168 [
3169 "apple",
3170 [
3171 [
3172 "man",
3173 "one"
3174 ],
3175 [
3176 "child",
3177 "many"
3178 ]
3179 ]
3180 ],
3181 [
3182 "banana",
3183 [
3184 [
3185 "man",
3186 "many"
3187 ]
3188 ]
3189 ],
3190 [
3191 "cacao",
3192 [
3193 [
3194 "woman"
3195 ]
3196 ]
3197 ]
3198 ]
3199 ]
3200 ]
3201
3202 * [Windows] Dropped support for packages of Windows version that we had cross compiled by using MinGW on Linux.
3203
3204 * Because there aren't probably many people who use that.
3205 * These above packages are that We had provided as below name until now.
3206
3207 * ``groonga-x.x.x-x86.exe``
3208 * ``groonga-x.x.x-x86.zip``
3209 * ``groonga-x.x.x-x64.exe``
3210 * ``groonga-x.x.x-x86.zip``
3211
3212 * From now on, we use the following packages for Windows.
3213
3214 * ``groonga-latest-x86-vs2019-with-vcruntime.zip``
3215 * ``groonga-latest-x64-vs2019-with-vcruntime.zip``
3216
3217 * If a system already has installed Microsoft Visual C++ Runtime Library, we suggest that we use the following packages.
3218
3219 * ``groonga-latest-x86-vs2019.zip``
3220 * ``groonga-latest-x64-vs2019.zip``
3221
3222 Fixes
3223 ^^^^^
3224
3225 * Fixed a bug that there is possible that index is corrupt when Groonga executes many additions, delete, and update information in it.
3226
3227 * This bug occurs when we only execute many delete information from index.
3228 However, it doesn't occur when we only execute many additions information into index.
3229
3230 * We can repair the index that is corrupt by this bug using reconstruction of it.
3231
3232 * This bug doesn't detect unless we reference the broken index.
3233 Therefore, the index in our indexes may has already broken.
3234
3235 * We can use [:doc:`/reference/commands/index_column_diff`] command to confirm whether the index has already been broken or not.