Bug 10482 - add items limit and sort to rebuild zebra
Summary: add items limit and sort to rebuild zebra
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Fridolin Somers
QA Contact:
URL:
Keywords:
Depends on: 7986
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-17 13:48 UTC by Fridolin Somers
Modified: 2015-06-04 23:23 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch (5.85 KB, patch)
2013-06-17 14:18 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2013-06-17 13:48:13 UTC
When indexing biblio records, the items are added into MARC format during database export (MARCXML or ISO2709).
For some records, there is a huge number of items, mainly serials creating an item for each issue.
There should be an option in rebuild_zebra.pl to limit the number of items added to record and an option to define a sort of those items.
This will speed-up some indexing and avoid a known bug : when Zebra has a record with size too big for ISO2709 format this record returned as search result is broken (some items fields contains odd characters).
Comment 1 Fridolin Somers 2013-06-17 14:18:33 UTC
Created attachment 19073 [details] [review]
Proposed patch

See commit message
Comment 2 I'm just a bot 2013-09-29 05:00:47 UTC
Patch applied cleanly, go forth and signoff
Comment 3 I'm just a bot 2013-10-30 07:16:58 UTC
Patch applied cleanly, go forth and signoff
Comment 4 David Cook 2014-03-26 07:47:08 UTC
Bug 11096 should take care of the record size problem. 

As for limiting the number of items...I'm not sure that an arbitrary cut off is the best idea, as it will lead to unexpected/unpredictable results.

Off the top of my head, it should also create problems with search. The barcode (i.e. "bc") and call number indexes being the ones that spring immediately to mind. 

I haven't put too much thought into it at this point, but...this patch seems like it would introduce a lot of (sometimes silent) problems.
Comment 5 Fridolin Somers 2014-03-26 10:04:25 UTC
(In reply to David Cook from comment #4)
> Bug 11096 should take care of the record size problem. 
Indeed.

But this is only an indexing option, not mandatory to use. It is made to cut off if there is a huge number of items, like more than 100.
It corrects a problem and makes indexing faster.
So why not adding it ?
Comment 6 Fridolin Somers 2014-09-18 15:42:59 UTC
In the end, I agree, no need to have more options and the risk off misunderstand is real.

Thanks for your help.