<div dir="ltr">Hi There is already a feature request (<a href="https://archivesspace.atlassian.net/browse/AR-795">https://archivesspace.atlassian.net/browse/AR-795</a>) 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.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 29, 2015 at 2:41 PM, Alexander Duryee <span dir="ltr"><<a href="mailto:alexanderduryee@nypl.org" target="_blank">alexanderduryee@nypl.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Chris,<br><br></div>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.</div><div><br></div>Thanks again,<br></div>--Alex<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 29, 2015 at 4:31 AM, Chris Fitzpatrick <span dir="ltr"><<a href="mailto:Chris.Fitzpatrick@lyrasis.org" target="_blank">Chris.Fitzpatrick@lyrasis.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div 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><span><font color="#888888">
</font></span></p><span><font color="#888888">
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>
<div name="divtagdefaultwrapper">
<div><font size="2">
<div>Chris Fitzpatrick | <font size="2">Developer, ArchivesSpace</font><br>
Skype: chrisfitzpat  | Phone: <a href="tel:918.236.6048" value="+19182366048" target="_blank">918.236.6048</a><br>
<a href="http://archivesspace.org/" target="_blank">http://archivesspace.org/</a><br>
</div>
</font></div>
</div>
</div>
</font></span><div style="color:rgb(33,33,33)"><span><font color="#888888">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> <a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a> <<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org" target="_blank">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>> on behalf of Alexander Duryee
 <<a href="mailto:alexanderduryee@nypl.org" target="_blank">alexanderduryee@nypl.org</a>><br>
<b>Sent:</b> Monday, April 27, 2015 11:24 PM<br>
<b>To:</b> <a href="mailto:archivesspace_users_group@lyralists.lyrasis.org" target="_blank">archivesspace_users_group@lyralists.lyrasis.org</a><br>
<b>Subject:</b> [Archivesspace_Users_Group] API Querying of Names</font>
<div> </div>
</div></font></span><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<span class="HOEnZb"><font color="#888888"><br>
</font></span></div><span class="HOEnZb"><font color="#888888">
<div><br>
-- <br>
<div>
<div dir="ltr">
<div>
<div dir="ltr">Alexander Duryee
<div>Metadata Archivist</div>
<div>New York Public Library</div>
<div><a href="tel:%28917%29-229-9590" value="+19172299590" target="_blank">(917)-229-9590</a></div>
<div><a href="mailto:alexanderduryee@nypl.org" target="_blank">alexanderduryee@nypl.org</a></div>
</div>
</div>
</div>
</div>
</div>
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div></div></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888">

<br>_______________________________________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" target="_blank">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
<br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div><div dir="ltr"><div><div dir="ltr">Alexander Duryee<div>Metadata Archivist</div><div>New York Public Library</div><div><a href="tel:%28917%29-229-9590" value="+19172299590" target="_blank">(917)-229-9590</a></div><div><a href="mailto:alexanderduryee@nypl.org" target="_blank">alexanderduryee@nypl.org</a></div></div></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
Archivesspace_Users_Group mailing list<br>
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br>
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" target="_blank">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Nathan Stevens<br>Programmer/Analyst<br>Digital Library Technology Services<br>New York University<br><br>1212-998-2653<br><a href="mailto:ns96@nyu.edu" target="_blank">ns96@nyu.edu</a></div>
</div>