[Archivesspace_Users_Group] Error when searching in archivesspace v2.1.1

Majewski, Steven Dennis (sdm7g) sdm7g at virginia.edu
Wed Aug 23 15:56:41 EDT 2017


PS to previous note:

I initially tried using ancestor display_string as the default, but that failed.

Although the ancestor resource has a display_string attribute containing the date, that does not appear to be indexed into the PUI index results returned by search results.  So getting that probably requires changes to the indexer as well.


ancestor.fetch( 'level' ) did work as alternative default:

<%= link_to process_mixed_content(ancestor.fetch('title', ancestor.fetch('level'))).html_safe, app_prefix(ancestor.fetch('uri')) %>


-- Steve Majewski / UVA Alderman Library
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Majewski, Steven Dennis (sdm7g) <sdm7g at virginia.edu>
Sent: Wednesday, August 23, 2017 3:29:39 PM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] Error when searching in archivesspace v2.1.1



It looks like adding a default arg to the fetch method is also a quick fix:

diff --git a/public/app/views/shared/_result.html.erb b/public/app/views/shared/_result.html.erb




index 01bfc6c..3434f05 100644




--- a/public/app/views/shared/_result.html.erb




+++ b/public/app/views/shared/_result.html.erb




@@ -50,7 +50,7 @@




           <% result.ancestors.each do |ancestor| %>




             /




             <span class="ancestor">




-            <%= link_to process_mixed_content(ancestor.fetch('title')).html_safe, app_prefix(ancestor.fetch('uri')) %>




+            <%= link_to process_mixed_content(ancestor.fetch('title', '[untitled]')).html_safe, app_prefix(ancestor.fetch('uri')) %>




             </span>




           <% end %>




         <% else %>


-- Steve Majewski / UVA Alderman Library
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Custer, Mark <mark.custer at yale.edu>
Sent: Wednesday, August 23, 2017 1:52:50 PM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] Error when searching in archivesspace v2.1.1

Neal, Lance: thanks for diagnosing this issue!

The PUI search results should definitely still work in this case.  We had archival objects in our test corpus with missing titles, so I’m pretty sure that this worked at some point, but it’s definitely not working now, as you’ve noticed.  I think the simple fix would be to fall back to the display title if a title doesn’t exist (the display title in ASpace concatenates the title and the first date subrecord together, so in the cases of a missing title, you might wind up with something like “1880-1889” as the search result link, or the breadcrumb link in the “Found In” section of the search results).  I’ve just added a JIRA ticket to capture this bug: https://archivesspace.atlassian.net/browse/AR-1869

Mark



From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Harmeyer, Neal A
Sent: Wednesday, 23 August, 2017 1:18 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Error when searching in archivesspace v2.1.1


Hi Lance,



We've experienced this issue as well, in search results after the move to 2.1. We recently finished some testing on it. Our findings suggest this is directly related to archival objects that possess a date subrecord but no title. For these records, a search in the new public interface spawns the ‘something went wrong’ message—from our error logs and yours, it looks like the search parameters are looking for titles and when those do not exist, and it breaks the search. Although an archival object title in ASpace is conditionally required when a date subrecord is present, the search does not seem to recognize that flexibility.



In addition, it appears when a keyword search is conducted across all record types, and any one of the related archival objects (for example, a sibling or child archival object in a series) does not have a title, any search for terms in that series will also generate the ‘something went wrong’ search result.



We’ve been able to reproduce this result and repair it. Adding the titles resolved the search error. I also created a simple test record with archival objects that do not possess titles; a search within the titles gives the broken search result but once the title is entered and saved, the search works. I’ve attached an EAD export of that test resource record (we used unique terms for us, ‘AEIOU’ and ‘fuzzy’ so we could pinpoint the test). You’ll see that the series in the EAD export does not have a <unittitle> field.



We’ve made the local decision to require title fields for all archival objects.



I hope this helps identity trouble areas. Perhaps the public interface search could be updated to work with archival objects lacking titles—or the archival object title field made required?


Neal
--
Neal Harmeyer
Digital Archivist
Archives and Special Collections
Purdue University Libraries
harmeyna at purdue.edu<mailto:harmeyna at purdue.edu>






-----Original Message-----
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of DUPRE, LANCE
Sent: Wednesday, August 23, 2017 11:55 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: [Archivesspace_Users_Group] Error when searching in archivesspace v2.1.1



Hello,



We have a test instance of archivespace 2.1.1 that is throwing the "Something went wrong" error when a search is performed searching all record types and for a keyword. It is only throwing the error for certain words (ex tree, navy and possibly others) and other words return results fine. The * wildcard also returns results.



Our production instance, on archivesspace 1.5.4 does not throw these errors when I do the same search.



I have attached the logs I think are relevant to the search.



Any help would be appreciated.



Thanks,







, [2017-08-23T11:48:57.060531 #11297] DEBUG -- : Thread-2022: GET /repositories/9/accessions?all_ids=true&modified_since=1503433821 [session: #<Session:0x291a34af @store={:user=>"search_indexer", :login_time=>2017-08-23 10:57:40 -0400, :expirable=>false}, @id="35ccdf0821cbc8065adf7f1576eb02e254564cd1484d6cc5dec6c673ae3ba709", @system_mtime=2017-08-23 15:48:27 UTC>] D, [2017-08-23T11:48:57.061902 #11297] DEBUG -- : Thread-2022: Post-processed params: {"all_ids"=>true, "modified_since"=>1503433821, :repo_id=>9} Aug 23, 2017 11:48:57 AM org.eclipse.jetty.server.handler.ContextHandler$Context log

INFO: F, [2017-08-23T11:48:57.063591 #11297] FATAL -- : [11861f8d-4ed2-494e-93d5-bde230321aec]



Aug 23, 2017 11:48:57 AM org.eclipse.jetty.server.handler.ContextHandler$Context log

INFO: F, [2017-08-23T11:48:57.064606 #11297] FATAL -- : [11861f8d-4ed2-494e-93d5-bde230321aec] ActionView::Template::Error (key not found: :title):



D, [2017-08-23T11:48:57.066191 #11297] DEBUG -- : Thread-2022: Responded with [200, {"Content-Type"=>"application/json", "Cache-Control"=>"private, must-revalidate, max-age=0", "Content-Length"=>"3"}, ["[]\n"]]... in 6ms Aug 23, 2017 11:48:57 AM org.eclipse.jetty.server.handler.ContextHandler$Context log

INFO: F, [2017-08-23T11:48:57.065756 #11297] FATAL -- : [11861f8d-4ed2-494e-93d5-bde230321aec]     50:           <% result.ancestors.each do |ancestor| %>

[11861f8d-4ed2-494e-93d5-bde230321aec]     51:             /

[11861f8d-4ed2-494e-93d5-bde230321aec]     52:             <span class="ancestor">

[11861f8d-4ed2-494e-93d5-bde230321aec]     53:             <%= link_to process_mixed_content(ancestor.fetch('title')).html_safe, app_prefix(ancestor.fetch('uri')) %>

[11861f8d-4ed2-494e-93d5-bde230321aec]     54:             </span>

[11861f8d-4ed2-494e-93d5-bde230321aec]     55:           <% end %>

[11861f8d-4ed2-494e-93d5-bde230321aec]     56:         <% else %>



Aug 23, 2017 11:48:57 AM org.eclipse.jetty.server.handler.ContextHandler$Context log

INFO: F, [2017-08-23T11:48:57.066453 #11297] FATAL -- : [11861f8d-4ed2-494e-93d5-bde230321aec]



Aug 23, 2017 11:48:57 AM org.eclipse.jetty.server.handler.ContextHandler$Context log

INFO: F, [2017-08-23T11:48:57.067003 #11297] FATAL -- : [11861f8d-4ed2-494e-93d5-bde230321aec] app/views/shared/_result.html.erb:53:in `block in _app_views_shared__result_html_erb___496965727_2290'

[11861f8d-4ed2-494e-93d5-bde230321aec] app/views/shared/_result.html.erb:50:in `_app_views_shared__result_html_erb___496965727_2290'

[11861f8d-4ed2-494e-93d5-bde230321aec] app/views/search/search_results.html.erb:72:in `block in _app_views_search_search_results_html_erb___490211956_2278'

[11861f8d-4ed2-494e-93d5-bde230321aec] app/views/search/search_results.html.erb:71:in `_app_views_search_search_results_html_erb___490211956_2278'

[11861f8d-4ed2-494e-93d5-bde230321aec] app/controllers/search_controller.rb:59:in `search'





_______________________________________________

Archivesspace_Users_Group mailing list

Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>

http://secure-web.cisco.com/15lWK5VFuWNYU8-dysqpky6CV0tBt-4GGXX7vXdSyYU9KRzp-CuiExj7UOi6znSgQuoHzU_bugQWuB2AhpAoyjk-8HZ_7zXWkpvTrrtiKG9VSeG2Z4UtkxEkMafDFKKmdLWkVH7PocSqfwIt6DzC4FMFo5uN9X1_vHDu_Pcd36-BPZHVDrRxYibxSD5OgpCEOvauD51TSX2pgrdDEdUKOcxDsX1XtcmTkpJ2P28WEorUKVG5yLWdx2gF_MekYRyTJZoUBiDtGJdOm2p8LLuRBCStt4PVbjoBt5SwPrkYWO1B3xEaBMP1dw3P0_QhDbEv8lbuuhadbsK4cp5EKBqAZNiJ4sJFSEEYPQiHaUYCGLCU/http%3A%2F%2Flyralists.lyrasis.org%2Fmailman%2Flistinfo%2Farchivesspace_users_group<https://urldefense.proofpoint.com/v2/url?u=http-3A__secure-2Dweb.cisco.com_15lWK5VFuWNYU8-2Ddysqpky6CV0tBt-2D4GGXX7vXdSyYU9KRzp-2DCuiExj7UOi6znSgQuoHzU-5FbugQWuB2AhpAoyjk-2D8HZ-5F7zXWkpvTrrtiKG9VSeG2Z4UtkxEkMafDFKKmdLWkVH7PocSqfwIt6DzC4FMFo5uN9X1-5FvHDu-5FPcd36-2DBPZHVDrRxYibxSD5OgpCEOvauD51TSX2pgrdDEdUKOcxDsX1XtcmTkpJ2P28WEorUKVG5yLWdx2gF-5FMekYRyTJZoUBiDtGJdOm2p8LLuRBCStt4PVbjoBt5SwPrkYWO1B3xEaBMP1dw3P0-5FQhDbEv8lbuuhadbsK4cp5EKBqAZNiJ4sJFSEEYPQiHaUYCGLCU_http-253A-252F-252Flyralists.lyrasis.org-252Fmailman-252Flistinfo-252Farchivesspace-5Fusers-5Fgroup&d=DwMFAg&c=cjytLXgP8ixuoHflwc-poQ&r=7Ez68qVcrmRD6nn1FqwoHBDEOxeRUCPm3xGvnFT0zjU&m=mpHMJLQMavJ8Nlt8mxcvinU_1GW70LubcVmfBKtPTmU&s=FLT7uFM2xhIdainWCFMWGeN7rysW-H8AUCtbMnkC6lQ&e=>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20170823/ef324f86/attachment.html>


More information about the Archivesspace_Users_Group mailing list