From: Steven P. J. <st...@ar...> - 2012-12-27 18:21:02
|
Demian Evidently my memory & brainworks cannot be trusted before the morning dog walk and bike ride to work... During the walk and ride, I recalled that of course I was the one who set those publishDate and publishDatesort values in marc_local.properties. (And why did I mention a theme?) Per the documentation, I had copied and edited the publishDate lines from marc.properties. In an attempt to get the date sort to work, I pulled the line "publishDateSort = custom, getDate" directly from the schema.xml, in my typical trial and error way, and learned that the results were not as desired. (Several other variations resulted in fatal errors in indexing.) I removed the date sorts from searches.ini on the production server and will work with date sorting on the test server. Thank you for your assistance. Steve Steve Johnson Alaska Resources Library & Information Services (ARLIS) Anchorage, AK 99508 907 786-7661 st...@ar...<mailto:st...@ar...> From: Demian Katz [mailto:dem...@vi...] Sent: Thursday, December 27, 2012 5:07 AM To: Steven P. Johnson; vuf...@li... Subject: RE: Sort by date, VuFind 1.3 Is it intentional that the publishDate field is being given the "script" BeanShell version (comma-delimited list) while the publishDateSort field is being given the "custom" (i.e. built-in SolrMarc) version (first year string only)? Is it possible that you haven't fully reindexed since upgrading from an earlier version of VuFind? Changes in date sorting behavior between 1.2 and 1.3 have been known to cause problems if the index is not rebuilt. If that doesn't help (or if you want to set up some extra debugging while you are reindexing), it might be worth modifying the schema to temporarily make the publishDateSort field "stored=true" so that after reindexing, you can view the Solr output and see exactly which values are being used for sorting. If you want to try this but need more details how, just let me know. - Demian ________________________________ From: Steven P. Johnson [st...@ar...] Sent: Wednesday, December 26, 2012 5:46 PM To: vuf...@li...<mailto:vuf...@li...> Subject: [VuFind-Tech] Sort by date, VuFind 1.3 Sorting by date/year of publication is not working in a VuFind 1.3 collection, though search by year works. Both ascending and descending date/year sorts return records in no obviously sorted order. In this collection, the only collection in this instance of VuFind, the 518a field was used, rather than 260c, for date of publication. In marc_local.properties, fields are defined as : publishDate = 518c publishDate = script(getdate.bsh), getDate publishDateSort = custom, getDate In getDate.bsh, I made changes only in the last section: /** * Project is using 518a as a date string * Return the date in 260c as a string * @param record - the marc record object * @return 260c, "cleaned" per org.solrmarc.tools.Utils.cleanDate() */ public String getDate(Record record) { Set result = SolrIndexer.getFieldList(record, "518a"); /* Set result = SolrIndexer.getFieldList(record, "260c"); */ String date = org.solrmarc.tools.Utils.join(result, ", "); if (date == null || date.length() == 0) return (null); return cleanDate(date); } My guess is that I need to make corresponding changes in one or more places in VuFind. I would appreciate any leads. Thank you, Steve Johnson Alaska Resources Library & Information Services (ARLIS) Anchorage, AK 99508 907 786-7661 st...@ar...<mailto:st...@ar...> |