[Archivesspace_Users_Group] Repository Search API Behavior

Smith, Steelsen steelsen.smith at yale.edu
Mon May 11 10:00:53 EDT 2015


Thanks, Chris.

That's indeed what I found. I was thrown by the error message that implies any of the three limiting parameters can be used. The autodocs also don't mention it. Very low priority but maybe something to add to the bugtracker.

Best,
Steelsen

From: archivesspace_users_group-bounces at lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org] On Behalf Of Chris Fitzpatrick
Sent: Monday, May 11, 2015 8:29 AM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] Repository Search API Behavior


Hi Steelsen,



Yeah, the solr queries done under the search end-points are paginated, but slightly different.  The all_ids parameter is actually not used, but you do need to put a :page parameter ( that's what the nilClass error is complaining about )



http://devaspace.library.yale.edu:8089/repositories/20/search?q=MS 1981&filter_term[]={"level": "series"}&page=1



should work...b,chris.




Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat  | Phone: 918.236.6048
http://archivesspace.org/
________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org> <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Smith, Steelsen <steelsen.smith at yale.edu<mailto:steelsen.smith at yale.edu>>
Sent: Friday, May 8, 2015 8:39 PM
To: Archivesspace Users Group
Subject: [Archivesspace_Users_Group] Repository Search API Behavior

Hi,

I'm presently working with the repository search endpoint (/repositories/:repo_id/search) and note in the documentation that it doesn't include a limiting parameter. Attempting to return all results yields a 500 error. Can anyone tell me if this is expected behavior?

Trying

http://devaspace.library.yale.edu:8089/repositories/20/search?q=MS 1981&filter_term[]={"level": "series"}

Gives back an error asking to specify set, page, or all ids:

{"error":{"page":["Parameter required but no value provided"],"id_set":["Parameter required but no value provided"],"all_ids":["Parameter required but no value provided"]}}

Specifying page works, but specifying all_ids=true:

http://devaspace.library.yale.edu:8089/repositories/20/search?q=MS 1981&filter_term[]={"level": "series"}&all_ids=true

Internal Server Error (500)
Request Method:

GET

Request URL:

http://devaspace.library.yale.edu:8089/repositories/20/search?q=MS%201981&filter_term[]={%22level%22:%20%22series%22}&all_ids=true<http://devaspace.library.yale.edu:8089/repositories/20/search?q=MS%201981&filter_term%5b%5d=%7b%22level%22:%20%22series%22%7d&all_ids=true>

(NoMethodError) undefined method `-' for nil:NilClass




___________________________
Steelsen Smith
Fulfillment Systems Specialist
Enterprise Systems Group
Yale Library IT
203.432.3333

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


More information about the Archivesspace_Users_Group mailing list