Go to file
Tomas Cohen Arazi ce4522db14
Bug 38101: Make ES indexer split big fields into chunks
This patch makes the `_process_mappings()` method split the index values
in the event of them being bigger than the allowed 32766 bytes size.

To test:
1. Have KTD running with ES:
   $ ktd --proxy --es7 up -d
2. Perform a search
3. Pick the first result for edition
4. Find a cool Wiki page with lots of paragraphs
5. Copy all of the paragraphs and put them on a 500$a field for the record.
6. Repeat 2
=> FAIL: The record is not found
7. Reindex manually:
   $ ktd --shell
  k$ perl misc/search_tools/rebuild_elasticsearch.pl --biblios --where "biblionumber=3"  -v -v
=> FAIL: You get something like:
```
[22229] Committing final records...
One or more ElasticSearch errors occurred when indexing documents at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/Indexer.pm line 148.
[22229] There were errors during indexing
Record #3 Document contains at least one immense term in field="note.raw" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped.  Please correct the analyzer to not produce such terms.  The prefix of the first immense term is: '[10, 109, 117, 115, 116, 97, 102, 97, 32, 102, 117, 101, 32, 101, 108, 32, 115, 101, 103, 117, 110, 100, 111, 32, 104, 105, 106, 111, 32, 100]...', original message: bytes can be at most 32766 in length; got 32771 (illegal_argument_exception) : max_bytes_length_exceeded_exception (bytes can be at most 32766 in length; got 32771)
[22229] Total 1 records indexed
```
8. Apply this patch
9. Repeat 7
=> SUCCESS: No error!
10. Repeat 2
=> SUCCESS: The record is indexed and can be found!
11. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6998f5b7e1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-02-04 21:50:22 +01:00
C4 Bug 38531: add diff when reverting hold 2025-01-30 22:54:45 +01:00
Koha Bug 38101: Make ES indexer split big fields into chunks 2025-02-04 21:50:22 +01:00
acqui Bug 38155: (QA follow-up) Fix TT filters and scalar context 2025-02-04 21:44:06 +01:00
admin Bug 38482: Remove save state for the holdings tables 2024-11-20 14:02:01 +01:00
api Bug 37393: fix "In bundle:" link not showing for items in staff interface 2024-12-10 16:59:15 +01:00
authorities Bug 36603: (QA follow-up) Resolve two conditional declarations 2024-11-08 16:42:53 +01:00
basket Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
bin
…
bookings
…
catalogue Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
cataloguing Bug 38030: (QA follow-up) Move csrf_token to POST body from URL 2024-11-21 13:49:08 +01:00
circ Bug 28294: (follow-up) Adjust call to request transfer 2024-11-20 14:01:51 +01:00
clubs
…
course_reserves Bug 28762: Use Koha::Course in course-details controller 2024-07-23 16:04:05 +01:00
debian Bug 33018: debian package tidy-up 2025-01-30 22:54:38 +01:00
docs 24.11.00: Update history.txt 2024-11-25 20:38:55 +01:00
erm
…
errors Bug 37741: Do not send cookie back from error pages 2024-08-30 12:45:45 +02:00
etc Bug 36991: Add ability to scan call numbers index/search field 2024-11-08 16:42:51 +01:00
ill Bug 35570: Prevent use of ILL module if deprecated FreeForm backend is installed 2024-10-31 08:05:21 +01:00
installer Bug 38707: Patron restriction types from installer files not translatable 2025-01-30 22:54:47 +01:00
koha-tmpl Bug 38935: Actions column not translatable in itemsearch.tt 2025-02-04 21:47:12 +01:00
labels Bug 30745: (QA follow-up) tidy 2024-11-18 17:44:31 +01:00
lib Bug 35681: Use ::Bootstrap version of FromANSI 2024-05-02 16:47:39 +02:00
members Bug 28633: Add preferred name field to patrons 2024-11-11 14:12:09 +01:00
misc Bug 38382: Fresh connection when connexion CSRF token expires 2025-01-30 22:54:47 +01:00
offline_circ
…
opac Bug 38813: Make the 'curbside pickups' tab display selected if so 2025-02-04 21:46:04 +01:00
patron_lists
…
patroncards Bug 37614: Printing patron cards from patron lists should be a GET 2024-08-16 17:33:45 +02:00
plugins Bug 30897: Add option to disable automated restart 2024-04-11 16:53:42 +02:00
pos Bug 33478: Apply formatting to RECEIPT 2024-04-26 20:15:44 +02:00
preservation Bug 38089: (follow-up) More fixes for errors in original submission 2024-10-11 11:13:47 +02:00
recalls Bug 38089: (follow-up) More fixes for errors in original submission 2024-10-11 11:13:47 +02:00
reports Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-14 10:46:31 +01:00
reserve Bug 37868: Remove C4::Reserves::ToggleSuspend 2024-10-21 15:10:35 +02:00
reviews Bug 2486: Show user comments in staff interface 2024-08-26 17:39:42 +02:00
rotating_collections
…
serials Bug 29818: Cannot save subscription frequency without display order 2024-11-18 17:44:35 +01:00
services
…
skel
…
suggestion Bug 33484: Fix for suggestions 2024-10-28 17:10:26 +01:00
svc Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
t Bug 38101: Regression tests 2025-02-04 21:50:21 +01:00
tags
…
tools Bug 38452: Use lc() for case insensitivity 2025-01-30 22:54:20 +01:00
virtualshelves Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
xt Bug 37728: Adjust test to catch more missing 'op' in POSTed forms 2024-10-18 14:25:56 +02:00
.editorconfig
…
.eslintrc.json Bug 36400: Centralize {js,ts,vue} formatting config in .prettierrc.js 2024-04-22 08:57:39 +02:00
.gitignore Bug 35402: Update the OPAC and staff interface to Bootstrap 5 2024-08-23 15:58:41 +02:00
.htaccess
…
.mailmap 24.11.00: Update .mailmap 2024-11-25 13:16:42 +01:00
.perlcriticrc
…
.perltidyrc
…
.prettierrc.js Bug 36400: (follow-up) remove option editorconfig from .prettierrc.js 2024-04-22 08:57:40 +02:00
.proverc.dist
…
.stylelintrc.json
…
INSTALL
…
Koha.pm Increment version for 24.11.01 release 2025-01-06 13:42:01 +01:00
LICENSE
…
MANIFEST.SKIP
…
Makefile.PL Bug 37824: remove references to non-existent files in Makefile.PL 2024-09-27 15:58:35 +02:00
README
…
README.md
…
README.robots
…
about.pl Bug 35570: Prevent use of ILL module if deprecated FreeForm backend is installed 2024-10-31 08:05:21 +01:00
app.psgi Bug 36149: Add userenv middleware to app.psgi 2024-05-14 15:04:37 -03:00
build-resources.PL
…
changelanguage.pl
…
cpanfile Bug 33018: debian package tidy-up (2) 2025-01-30 22:54:39 +01:00
cypress.config.ts
…
fix-perl-path.PL
…
gulpfile.js Bug 36640: (follow-up) CSS fixes for DataTables controls 2024-11-14 14:19:34 +01:00
help.pl
…
kohaversion.pl
…
mainpage.pl Bug 36064: (QA follow-up) Simplify and tidy 2024-10-25 11:09:51 +02:00
package.json Bug 38424: Upgrade redoclyly/cli version to latest stable 2024-11-20 11:36:26 +01:00
rewrite-config.PL
…
rspack.config.js Bug 37824: (QA follow-up) Fix improper handling of jQuery and DataTables libraries by marking them as externals 2024-09-16 18:41:17 +02:00
tsconfig.json
…
webpack.config.js Bug 35919: Add record sources admin page 2024-04-26 17:06:04 +02:00
yarn.lock 38424: Update yarn.lock 2024-11-20 11:36:27 +01:00

README.md

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo