[Archivesspace_Users_Group] query patterns for strings

Arnold, Hillel harnold at rockarch.org
Sat Feb 18 11:48:31 EST 2017


Ah, sorry, read that a little too quickly and didn’t click through on your link the first time around.
Digging backwards, it looks like you might need to add some search definitions here: https://github.com/archivesspace/archivesspace/blob/master/common/search_definitions.rb but I have to admit I’ve never tried it so I might just be making stuff up again!

Hillel

From: <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Jason Loeffler <j at minorscience.com>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Date: Friday, February 17, 2017 at 6:39 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] query patterns for strings

Thanks, Hillel.

Sure, for Accessions that works.

But I'm targeting 'id'<https://github.com/archivesspace/archivesspace/blob/master/solr/schema.xml#L49>, which, in this case, is ambiguous. The request needs a further type parameter, something like &type[]=archival_object but I can't figure out the correct pattern based on the autodocs.

On Fri, Feb 17, 2017 at 6:02 PM, Arnold, Hillel <harnold at rockarch.org<mailto:harnold at rockarch.org>> wrote:
Hi Jason,
I think you need to use “identifier” rather than “id”, like:
search?page=1&?page_size=1&aq={"query":{"field":"identifier","value":"anything","jsonmodel_type":"field_query"}}'

Hillel

From: <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Jason Loeffler <j at minorscience.com<mailto:j at minorscience.com>>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Date: Friday, February 17, 2017 at 1:40 PM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: [Archivesspace_Users_Group] query patterns for strings

This example works taking into account solr/schema.xml<https://github.com/hudmol/archivesspace/blob/0bdeaabc6b3e8c878590e3d4db0e8c5b99b8c344/solr/schema.xml>:

search?page=1&?page_size=1&aq={"query":{"field":"title","value":"foo","jsonmodel_type":"field_query"}}'

This example returns "Unrecognized search field: id".

search?page=1&?page_size=1&aq={"query":{"field":"id","value":"anything","jsonmodel_type":"field_query"}}'

Is there an additional parameter required to address fields where type="string"?

JL

Jason Loeffler
Technology Consultant | The American Academy in Rome
Minor Science | Application Development & Metadata Strategy
Brooklyn, New York
jason at minorscience.com<mailto:jason at minorscience.com>
(347) 405-0826<tel:(347)%20405-0826>
minorscience (Skype)


_______________________________________________
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/20170218/06cb062d/attachment.html>


More information about the Archivesspace_Users_Group mailing list