Koha/misc
Tomas Cohen Arazi 5ef1b6710e Bug 18098: Add an index with the count of not onloan items
This patch adds a numeric index 'not-onloan-count' containing the value
of 999$x. This subfield is filled by 'rebuild_zebra.pl' by making use of
(bug's 18208) 'EmbedItemsAvailability' filter.

bib1.att and indexes definitions are updated accordingly.

To test:
- Apply the patch
- Pick the right biblio-zebra-indexdefs.xsl file for your setup and
  replace the one your Zebra uses [1]
- Replace your bib1.att
- Replace your ccl.properties
- Have at least one record with more than one item, checkout some
  item(s) from that record(s).
- Rebuild zebra's indexes:
  $ sudo koha-shell kohadev
 k$ cd kohaclone
 k$ misc/migration_tools/rebuild_zebra.pl -r -b -v -k
 (notice the dump directory is kept, you can try the XSLT yourself
  running:
    $ xsltproc \
       etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl \
       /tmp/the_dump_dir/biblios/exported_records | less
=> SUCCESS: There are records with the not-onloan-count index, and the
            value is correct!
- Check Zebra yourself:
  $ yaz-client unix:/var/run/koha/kohadev/bibliosocket
 Z> base biblios
 Z> find @attr 1=9013 @attr 2=5 @attr 4=109 0
=> SUCCESS: The search matches the amount of records with not-onloan
            items.
 Z> s 1+1
=> SUCCESS: Records with 999$x having a value higher than 0 are rendered
- Sign off :-D

Note: While this work is complete on its purpose, it is part of an
attempt to create a better way of filtering by availability.

Sponsored-by: ByWater Solutions

 [1] In kohadevbox this would be
/etc/koha/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl

Edit: Added the missing XSLT changes for UNIMARC and NORMARC

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-05-08 09:21:41 -04:00
..
admin
bin
cronjobs Bug 17952 - Lost items not skipped by overdue_notices.pl 2017-05-08 08:55:59 -04:00
devel Bug 17567: Make populate_db.pl initialize ES mappings 2016-11-12 02:39:35 +00:00
interface_customization Bug 17645 - Remove obsolete interface customization images 2016-11-18 14:16:08 +00:00
load_testing
maintenance Bug 18058: Allow borrower_message_preferences to be truncated 2017-03-31 10:07:03 +00:00
migration_tools Bug 18098: Add an index with the count of not onloan items 2017-05-08 09:21:41 -04:00
plack
release_notes Bug 17681: Exiisting typos might thow some feees when recieved 2016-12-16 11:29:33 +00:00
search_tools
translator Translations update for 16.11.0 2016-11-20 20:55:51 -03:00
batchCompareMARCvsFrameworks.pl
batchdeletebiblios.pl
batchDeleteUnusedSubfields.pl
batchImportMARCWithBiblionumbers.pl
batchRebuildBiblioTables.pl
batchRebuildItemsTables.pl Bug 9988: Remove further references to dontmerge 2017-04-13 08:53:47 -04:00
batchRepairMissingBiblionumbers.pl
check_sysprefs.pl
commit_file.pl
export_borrowers.pl Bug 18432 : Follow up - Updating to use they/them 2017-04-21 10:56:43 -04:00
export_records.pl Bug 15498: Let the user choose the CSV profile to export circ history 2017-03-31 11:13:47 +00:00
exportauth.pl
koha-install-log
kohalib.pl
link_bibs_to_authorities.pl
mod_zebraqueue.pl
perlmodule_ls.pl
perlmodule_rm.pl
recreateIssueStatistics.pl
sax_parser_print.pl Bug 17626 (QA followup) 2016-11-22 11:29:07 +00:00
sax_parser_test.pl
sip_cli_emulator.pl Bug 16757 - Add support for Fee Paid to SIP cli emulator for testing 2017-03-31 13:56:37 +00:00
stage_file.pl