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).
Created attachment 19073 [details] [review] Proposed patch See commit message
Patch applied cleanly, go forth and signoff
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.
(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 ?
In the end, I agree, no need to have more options and the risk off misunderstand is real. Thanks for your help.