[Archivesspace_Users_Group] API Querying of Names
Chris Fitzpatrick
Chris.Fitzpatrick at lyrasis.org
Wed Apr 29 04:31:33 EDT 2015
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<mailto:alexanderduryee at nypl.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20150429/78e04440/attachment.html>
More information about the Archivesspace_Users_Group
mailing list