There is na index for Date/time-last-modified but the slash (/) can cause issues. This patch will add aliases for this field.
Created attachment 47398 [details] [review] Bug 15694: Add aliases for date/time last modified This patch will add indexes for Date/time-last-modified. To test: 1. apply patch 2. reindex 3. search for dtlm:DATE and date-time-last-modified:DATE 4. confirm that you get results
This is my first ever patch like this so I welcome feedback.
Maybe a better test plan for example: To reproduce the issue: -Choose a bib record and copy the date in 005 field -search under Date/time-last-modified:20160201094709.0 -No results found To test: 1. apply patch 2. reindex 3. search for dtlm:DATE and date-time-last-modified:DATE 4. confirm that you get results
Created attachment 47512 [details] [review] [SIGNED-OFF]Bug 15694: Add aliases for date/time last modified This patch will add indexes for Date/time-last-modified. To test: 1. apply patch 2. reindex 3. search for dtlm:DATE and date-time-last-modified:DATE 4. confirm that you get results Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised
Nicole, I think the files biblio-koha-indexdefs.xml and biblio-zebra-indexdefs.xsl need to be updated when a zebra index is added/deleted/modified.
Created attachment 47561 [details] [review] Bug 15694: (followup)Update DOM index filter definitions Update for MARC21 biblio-koha-indexdefs.xml and biblio-zebra-indexdefs.xsl To test follow the previus test plan
(In reply to Jonathan Druart from comment #5) > Nicole, > I think the files biblio-koha-indexdefs.xml and biblio-zebra-indexdefs.xsl > need to be updated when a zebra index is added/deleted/modified. Hi Jonathan and Nicole This really works without update the files. My question is why?
It does not work for me with only the first patch applied. The changes need to be made for normarc and unimarc as well.
(In reply to Jonathan Druart from comment #8) > It does not work for me with only the first patch applied. > The changes need to be made for normarc and unimarc as well. Hi Jonathan It seems to be that NORMARC does not use this index.
Created attachment 47741 [details] [review] Bug 15694: (followup)Update DOM index for UNIMARC/biblios Update for UNIMARC biblio-koha-indexdefs.xml and biblio-zebra-indexdefs.xsl To test follow the first test plan in UNIMARC environment
Tried a few times to get this to work. date-time-last-modified:DATE doesn't search for anything on the sandboxes. Are you able to search for a date modified on a record that's already there or does it require a reindex to fix the searching or just find new records?
Hi Jason, indexing patches are usually not testable on the sandboxes to my knowledge. On a dev installation you'd have to do a full reindex after copying index definition files into the correct place.
(In reply to Jason Burds from comment #11) > Tried a few times to get this to work. > > date-time-last-modified:DATE doesn't search for anything on the sandboxes. > > Are you able to search for a date modified on a record that's already there > or does it require a reindex to fix the searching or just find new records? Hi Jeson You need to reindex. For example I have a record in MARC21 with field 20160201110256.0 Apply patch reindex zebra and search again dtlm:20160201110256.0 or Date-time-last-modified:20160201110256.0 and the system retrieve my record. I don't know if you can reindex Zebra in sandboxes :( Regards
There is something wrong here. The 1st patch is enough. No reindexing is required since 'Date/time-last-modified' index is already defined. After adding an alias in ccl.properties (1st patch), and copying ccl.properties in the installed configuration, restarting the Zebra server is all you need to do to get working searches without prefix with ccl=
You don't have to add a new index: <target_index>dtlm:w</target_index> 'dtlm' is just a CCL shortcut to the already existing index Date/time-last-modified.
Comment on attachment 47561 [details] [review] Bug 15694: (followup)Update DOM index filter definitions Not required
Comment on attachment 47741 [details] [review] Bug 15694: (followup)Update DOM index for UNIMARC/biblios Not required
Created attachment 48611 [details] [review] Bug 15694: Add aliases for date/time last modified This patch will add indexes for Date/time-last-modified. To test: 1. apply patch 2. reindex 3. search for dtlm:DATE and date-time-last-modified:DATE 4. confirm that you get results Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Frédéric Demians <f.demians@tamil.fr> I confirm Hector signing-off. A simple Zebra server restart suffice to get working the searches on date-time-last-modified and dtlm.
Created attachment 48991 [details] [review] Bug 15694: Add aliases for date/time last modified This patch will add indexes for Date/time-last-modified. To test: 1. apply patch 2. reindex 3. search for dtlm:DATE and date-time-last-modified:DATE 4. confirm that you get results Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as advertised Signed-off-by: Frédéric Demians <f.demians@tamil.fr> I confirm Hector signing-off. A simple Zebra server restart suffice to get working the searches on date-time-last-modified and dtlm. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Frédéric was right, sorry Héctor for the additional work :-/
Pushed to Master - Should be in the May 2016 release. Thanks!
Patch pushed to 3.22.x, will be in 3.22.5