<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1" dir="ltr">
<div style="direction: ltr;font-family: Verdana;color: #000000;font-size: 10pt;">
Not sure if you keep up on this list, so here is the response, some good ideas if not workarounds :-)<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px">
<div style="font-size:13px">
<div style="font-size:13px"><span style="font-family:Tahoma; color:rgb(128,128,128)"><span style="font-family:Verdana"></span></span>
<hr style="width:100%; height:2px">
<font face="Helvetica" size="1"><span style="color:rgb(128,128,128)">Russell Schelby<br>
Project Manager, Business Analyst<br>
</span><span style="color:rgb(128,128,128)">Applications, Development & Support<font size="1"><font size="1"><font size="1"></font>,
</font></font>OSU Libraries</span><span style="color:rgb(128,128,128)"><br>
Schelby.1@osu.edu<font size="1">,</font> 614.292.0961</span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF726802"><font face="Tahoma" color="#000000" size="2"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org [archivesspace_users_group-bounces@lyralists.lyrasis.org] on behalf of Chris Fitzpatrick [Chris.Fitzpatrick@lyrasis.org]<br>
<b>Sent:</b> Wednesday, April 29, 2015 4:31 AM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] API Querying of Names<br>
</font><br>
</div>
<div></div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>Hi Alex,</p>
<p><br>
</p>
<p>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.
</p>
<p><br>
</p>
<p>I might suggest loading your agents in first, which would allow for the index to finish.</p>
<p>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.
</p>
<p><br>
</p>
<p>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.
</p>
<p><br>
</p>
<p>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.
</p>
<p><br>
</p>
<p>b,chris. <br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div class="BodyFragment"><font size="2">
<div class="PlainText">Chris Fitzpatrick | <font size="2">Developer, ArchivesSpace</font><br>
Skype: chrisfitzpat | Phone: 918.236.6048<br>
http://archivesspace.org/<br>
</div>
</font></div>
</div>
</div>
<div style="color:rgb(33,33,33)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Alexander Duryee
<alexanderduryee@nypl.org><br>
<b>Sent:</b> Monday, April 27, 2015 11:24 PM<br>
<b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br>
<b>Subject:</b> [Archivesspace_Users_Group] API Querying of Names</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>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/.<br>
<br>
</div>
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.<br clear="all">
<div>
<div><br>
</div>
<div>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?<br>
<br>
</div>
<div>Many thanks,<br>
</div>
<div>--Alex<br>
</div>
<div><br>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">Alexander Duryee
<div>Metadata Archivist</div>
<div>New York Public Library</div>
<div>(917)-229-9590</div>
<div><a href="mailto:alexanderduryee@nypl.org" target="_blank">alexanderduryee@nypl.org</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>