[Archivesspace_Users_Group] API Querying of Names

Nathan Stevens ns96 at nyu.edu
Wed Apr 29 15:00:56 EDT 2015


Hi There is already a feature request (
https://archivesspace.atlassian.net/browse/AR-795) to allow the backend not
to throw an error when existing Names and Subjects are already in the
database.  Just contact the ASpace team to push for this issue to be added
to a next release.

On Wed, Apr 29, 2015 at 2:41 PM, Alexander Duryee <alexanderduryee at nypl.org>
wrote:

> Chris,
>
> Thanks for your reply.  I'd like to bypass Solr as much as possible, so
> we'll look into developing a controller that takes a string and returns the
> matching agent object.
>
> Thanks again,
> --Alex
>
> On Wed, Apr 29, 2015 at 4:31 AM, Chris Fitzpatrick <
> Chris.Fitzpatrick at lyrasis.org> wrote:
>
>>
>>  Hi Alex,
>>
>>
>>  There's a few ways you could do this, but it also probably has to do
>> with your data. The problem is that records added to the database need to
>> be indexed in Solr, so when you're batch loading a lot of records the
>> indexer will lag.
>>
>>
>>  I might suggest loading your agents in first, which would allow for the
>> index to finish.
>>
>> Another option would be to reduce the period the indexer runs ( the
>> default is 30 seconds ) , as well as the number of threads it's using  in
>> the config.rb. However, this would require you to have more processors and
>> memory available, so if you do this, you'll need to run it on a
>> multi-processor machine and increase the java heap space.
>>
>>
>>  If you're having issues with the search api, you can also just access
>> Solr's search API directly, which would give you a lot of options for term
>> searching.
>>
>>
>>  Lastly, you could also write controller and include it as a plugin to
>> search the database directly, by passing the need for the solr index to be
>> populated.
>>
>>
>>  b,chris.
>>
>>
>>
>>
>>
>>   Chris Fitzpatrick | Developer, ArchivesSpace
>> Skype: chrisfitzpat  | Phone: 918.236.6048
>> http://archivesspace.org/
>>    ------------------------------
>> *From:* archivesspace_users_group-bounces at lyralists.lyrasis.org <
>> archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of
>> Alexander Duryee <alexanderduryee at nypl.org>
>> *Sent:* Monday, April 27, 2015 11:24 PM
>> *To:* archivesspace_users_group at lyralists.lyrasis.org
>> *Subject:* [Archivesspace_Users_Group] API Querying of Names
>>
>>   We're developing a migration tool to import records from our database
>> into ArchivesSpace via the API.  For each controlled access name in each
>> collection, our tool needs to know if a name record exists in
>> ArchivesSpace, and if so, query its ID in order to build the
>> collection-name link.  However, the only method that I've found to discover
>> agent/family/corp records (knowing only the type and title string) via the
>> API is GET /search/.
>>
>>  Using GET /search/ for discovering name records is proving unwieldy, as
>> there is a long delay (~30 seconds on localhost) between POSTing a new name
>> record and having it return in the index.  When generating many records at
>> once, this leads to frequent false negatives.  It also makes for slow
>> discovery, as a full search query has to be run, then some number of the
>> results iterated through, for every name.
>>
>>  Is there a more direct way to query ArchivesSpace for name records,
>> ideally bypassing search altogether?  If not, how are other API users
>> developing methods to match name records to ArchivesSpace objects?
>>
>>  Many thanks,
>>  --Alex
>>
>> --
>>   Alexander Duryee
>> Metadata Archivist
>> New York Public Library
>> (917)-229-9590
>> alexanderduryee at nypl.org
>>
>> _______________________________________________
>> Archivesspace_Users_Group mailing list
>> Archivesspace_Users_Group at lyralists.lyrasis.org
>> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>>
>>
>
>
> --
> Alexander Duryee
> Metadata Archivist
> New York Public Library
> (917)-229-9590
> alexanderduryee at nypl.org
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>


-- 
Nathan Stevens
Programmer/Analyst
Digital Library Technology Services
New York University

1212-998-2653
ns96 at nyu.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20150429/868e1772/attachment.html>


More information about the Archivesspace_Users_Group mailing list