LP#1251394 Display fields release notes
authorBill Erickson <berickxx@gmail.com>
Fri, 25 Aug 2017 16:58:00 +0000 (12:58 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 1 Sep 2017 21:17:47 +0000 (17:17 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>

docs/RELEASE_NOTES_NEXT/Administration/display-fields.adoc [new file with mode: 0644]

diff --git a/docs/RELEASE_NOTES_NEXT/Administration/display-fields.adoc b/docs/RELEASE_NOTES_NEXT/Administration/display-fields.adoc
new file mode 100644 (file)
index 0000000..dbeeb9d
--- /dev/null
@@ -0,0 +1,55 @@
+Configurable Bib Record Display Fields
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Admin -> Server Admin -> 'MARC Search/Facet Fields' have 2 new configuration 
+fields: 'Display Field?' and 'Display XPATH'.
+
+When 'Display Field' is set to true, data from the field will be extracted
+from each record and added to a new table of display data for each bib 
+record.  
+
+If a value is present in the 'Display XPATH' field, this XPATH will be
+applied to the extracted data *after* the base XPATH (from the 'XPath' 
+field) is applied to each field.
+
+This data acts as a replacement for the various and sundry ways bib record 
+data is currently extracted, including inline XPATH in the TPAC, reporter 
+views, real-time 'MVR' compilation from MODS, etc. and will be available
+to the user interface, notification templates, etc. for rendering bib 
+records.  
+
+The browser client gets a new service 'egBibDisplay' which is capable
+of translating the display field data from various formats into 
+data more suitable for JavaScript usage.
+
+The database gets 3 new VIEWs for representing display data in various
+formats:
+
+ * metabib.flat_display_entry
+  ** List of all display fields linked to their configuration.
+ * metabib.compressed_display_entry
+  ** Same as metabib.flat_display_entry except there's one row
+     per display field type, which 'mulit' rows compressed into
+     JSON arrays.  Non-multi fields are represented as JSON 
+     strings/numbers.
+ * metabib.wide_display_entry
+  ** Tabular view of display field data, one column per well-known
+     field.  Values are represented JSON, consistent with 
+     metabib.flat_display_entry.  The view DOE NOT CONTAIN locally
+     configured dispaly fields, as each field must be encoded in
+     the view and IDL definition.  This is essentially a replacement 
+     for reporter.simple_record.
+
+Reingesting
++++++++++++
+
+After making changes to display field configuration, it's possible to 
+reingest only display field data in the database using the following:
+
+[source,sql]
+---------------------------------------------------------------------
+SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE, TRUE, 
+  (SELECT ARRAY_AGG(id)::INT[] FROM config.metabib_field WHERE display_field))
+  FROM biblio.record_entry WHERE NOT deleted AND id > 0;
+---------------------------------------------------------------------
+