<div dir="ltr">Hrm... I traced back the date1 record attribute defintion, actually, rather than the pubdate metabib field. It's important to note that record attributes and metabib fields have /very/ different use cases, ingest performance profiles, and configuration shapes. What's most important here is that metabib fields are primarily meant to support search, and record attributes are primarily meant to support discrete value display and sorting. We should try to use a single value (multi=false in the config table) record attribute here, rather than a metabib field.<div><br></div><div>The drawback with Date1 (as in, the data coming from the 008) is that if you have really thin records the 008 may not exist. However I don't think the risk is really high there -- the record attribute version of pubdate comes from the 008 as well, and that is what we use as the data for the publication date sort axis. Oh! And, looking closer, the pubdate attribute uses the "Number or NULL Normalize" index normalizer (id=18), which is the second half of what I described before -- I'd just forgotten it existed. Adding index normalizer 19 in a position before number-or-null, and then setting up the view stack to use that record attribute, could be all that's needed.</div><div><br></div><div>So, I think the record attribute version of pubdate is actually the best data source.</div><div><br></div><div>One thing to consider is existing uses of whatever extant field we end up wanting to make use of. So, the Real Plan, IMO should do all that -^ as a /new/ record attribute rather than hijacking an existing one, nor should it use an existing metabib field (recall, those are about searching rather exposing data for other things to use), and have it land in a completely new column on the Simple Record Extracts materialized view. Then there's no chance of breaking existing reports with a column datatype change.</div><div><br></div><div>Thoughts on that?</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--<br>Mike Rylander<br>Research and Development Manager<br>Equinox Open Library Initiative<br>1-877-OPEN-ILS (673-6457)<br>miker@equinoxOLI.org<br><a href="https://equinoxOLI.org" target="_blank">https://equinoxOLI.org</a><br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 16, 2024 at 2:23 PM Blake Graham-Henderson <<a href="mailto:blake@mobiusconsortium.org">blake@mobiusconsortium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">All,<br>
<br>
Thanks for your considerate responses. What Mike said is the conclusion <br>
I had come to, and I was wondering if anyone else needs the publication <br>
year to be an actual number so that the reporter can do things like <br>
average,min,max,etc. From the sounds of it, no one is currently using <br>
the Evergreen reporter to produce such a thing (I don't see how you <br>
could). I suppose no one is using an external program to make it happen <br>
(to meet collection reporting needs from the higher-ups)?<br>
<br>
I agree with Mike, in that the best place to get the publication year <br>
(right now) is the Simple Record Extracts, because it hunts it down from <br>
several places in the bib record. Walking it backwards:<br>
<br>
reporter.materialized_simple_record -> reporter.old_super_simple_record <br>
-> metabib.wide_display_entry -> metabib.compressed_display_entry -> <br>
metabib.flat_display_entry -> metabib.display_entry<br>
<br>
Which is a trigger-created-table based upon the index definition found <br>
in config.metabib_field<br>
<br>
one of those views is hardcoded to expect "pubdate" to exist in the <br>
metabib_field definitions. Which exists with stock Evergreen <br>
definitions. Which is:<br>
<br>
"//mods33:mods/mods33:originInfo//mods33:dateIssued[@encoding="marc"]|//mods33:mods/mods33:originInfo//mods33:dateIssued[1]"<br>
<br>
Decoding that is fun. Suffice it to say: the pubyear can come from <br>
several places in the record, and I like that better than only looking <br>
in one place.<br>
<br>
So, in conclusion, if a patch were written, I think it would be smart to <br>
piggy back on this logic. It might be fairly straightforward to get the <br>
first occurrence from the JSON string and cast it to an integer <br>
(stripping out non-numeric characters first). That's where my thoughts <br>
are right now. I don't think we're going to be writing the patch anytime <br>
soon, just thinking through it with everyone.<br>
<br>
If everyone agrees that this is something that Evergreen should have, <br>
and we agree on the method, I might champion the bug and patch for <br>
future meetings and releases!<br>
<br>
-Blake-<br>
Conducting Magic<br>
Will consume any data format<br>
MOBIUS<br>
<br>
</blockquote></div>