[Archivesspace_Users_Group] Searches including colons

Nick Butler npwb2 at cam.ac.uk
Wed Mar 3 04:18:08 EST 2021


Hi Andrew,

We've added it to the PUI and SUI advanced search, in what I believe to be the standard manner (for the SUI, adding a line to search_definitions.rb, and for the PUI adding it to the :field_options arrays in the locals for the shared/search partial, in both the PUI search/search_results and welcome/show views). It's a *_u_sstr field, if that makes a difference, and we're storing multiple values in it. Exact (or wildcard) searches for any of the values being stored in the field are returning correct matches, except (as far as we can tell) when the searches contain colons, when they uniformly return no results.

Many thanks,
Nick

________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Andrew Morrison <andrew.morrison at bodleian.ox.ac.uk>
Sent: 02 March 2021 16:44
To: archivesspace_users_group at lyralists.lyrasis.org <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Searches including colons


How are you searching this field? If you've added it to the options in the PUI or SUI advanced search, it should be escaping the colon for you. If searching via the API, you probably need to do it yourself<https://lucene.apache.org/core/8_0_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Escaping_Special_Characters>.


Andrew.



On 02/03/2021 15:01, Nick Butler wrote:
Hi all,

We're currently experimenting with creating a new index field (a StrField) for alternative forms of our resource and archival object identifiers. This field is largely working fine and behaving as expected, but over the course of testing this work out we've noticed that searches including colons don't appear to return any results, even when the exact content of the index field is used (with or without quotation marks around the whole search). Have other people experienced something similar? Is there a known workaround?

Many thanks,
Nick



_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

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


More information about the Archivesspace_Users_Group mailing list