<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Awesome, thanks. I Don’t think I would have figured this out on my own.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Best,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Steelsen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> archivesspace_users_group-bounces@lyralists.lyrasis.org [mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org]
<b>On Behalf Of </b>Chris Fitzpatrick<br>
<b>Sent:</b> Monday, May 18, 2015 6:45 AM<br>
<b>To:</b> Archivesspace Users Group<br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] Advanced Search for API<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="divtagdefaultwrapper">
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Hi Steelsen,
<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Yes, so for advanced queries, you pass in a jsonmodel advanced_query object (
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_common_schemas_advanced-5Fquery.rb&d=AwMFAw&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=FlU_ig33o98uJUfe7Tv5TWs-EbGWSS7i3RH_JUJdg9A&m=Q512t8zeEpl-NggOW2V0X71mLIZtLKTKNL71eyIemzE&s=XKq3Z2Zcp5vN9160nKsQ5Fp36dAR-fNwL-niWBmhq-g&e=" id="LPlnk840737">
https://github.com/archivesspace/archivesspace/blob/master/common/schemas/advanced_query.rb</a> )<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"> This object has a property "query" that can be a boolean_query (
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_common_schemas_boolean-5Fquery.rb&d=AwMFAw&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=FlU_ig33o98uJUfe7Tv5TWs-EbGWSS7i3RH_JUJdg9A&m=Q512t8zeEpl-NggOW2V0X71mLIZtLKTKNL71eyIemzE&s=_6bZyOnpl71NPKRJjjla7NaDoWJlyhuiO4IlYlh4CGA&e=" id="LPlnk995531">
https://github.com/archivesspace/archivesspace/blob/master/common/schemas/boolean_query.rb)</a> boolean_field_query (
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_common_schemas_boolean-5Ffield-5Fquery.rb&d=AwMFAw&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=FlU_ig33o98uJUfe7Tv5TWs-EbGWSS7i3RH_JUJdg9A&m=Q512t8zeEpl-NggOW2V0X71mLIZtLKTKNL71eyIemzE&s=4KJTLPivqB8fCgXYZKlV7hqV_Lyo2nM00Epsp3VAvjY&e=" id="LPlnk355672">
https://github.com/archivesspace/archivesspace/blob/master/common/schemas/boolean_field_query.rb</a> ) date_field_query (
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_common_schemas_date-5Ffield-5Fquery.rb&d=AwMFAw&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=FlU_ig33o98uJUfe7Tv5TWs-EbGWSS7i3RH_JUJdg9A&m=Q512t8zeEpl-NggOW2V0X71mLIZtLKTKNL71eyIemzE&s=u_8ujNq8W5fiGCkEaDkrxfIpBAKuy_Oqe7nhFFUUguE&e=" id="LPlnk391768">
https://github.com/archivesspace/archivesspace/blob/master/common/schemas/date_field_query.rb</a> ) or a field_query (
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_archivesspace_archivesspace_blob_master_common_schemas_field-5Fquery.rb&d=AwMFAw&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=FlU_ig33o98uJUfe7Tv5TWs-EbGWSS7i3RH_JUJdg9A&m=Q512t8zeEpl-NggOW2V0X71mLIZtLKTKNL71eyIemzE&s=_juF6V_y9YnXDL2nWOt3-cb0CDSFnbSYnXUvs9sV0-U&e=" id="LPlnk972003">
https://github.com/archivesspace/archivesspace/blob/master/common/schemas/field_query.rb</a> )
<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">So, a queries could look like this:<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">boolean query ( keyword 'My Awesome Search Term' and 'AND' published = true ) :<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"> "<a href="http://localhost:4567/repositories/2/search?page=1&aq=%7b\">http://localhost:4567/repositories/2/search?page=1&aq={\</a>"query\":{\"op\":\"AND\",\"subqueries\":[{\"field\":\"keyword\",\"value\":\"My
Awesome Search Term\",\"jsonmodel_type\":\"field_query\",\"negated\":false,\"literal\":false},{\"field\":\"published\",\"value\":true,\"jsonmodel_type\":\"boolean_field_query\"}],\"jsonmodel_type\":\"boolean_query\"},\"jsonmodel_type\":\"advanced_query\"}"<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">boolean_field_query ( published = true ):<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">"<a href="http://localhost:4567/repositories/2/search?page=1&aq=%7b\">http://localhost:4567/repositories/2/search?page=1&aq={\</a>"query\":{\"field\":\"published\",\"value\":true,\"jsonmodel_type\":\"boolean_field_query\"},\"jsonmodel_type\":\"advanced_query\"}"<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">field query ( keyword for 'My Awesome Search Term') :
<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">"<a href="http://localhost:4567/repositories/2/search?page=1&aq=%7b\">http://localhost:4567/repositories/2/search?page=1&aq={\</a>"query\":{\"field\":\"keyword\",\"value\":\"My
Awesome Search Term\",\"jsonmodel_type\":\"field_query\",\"negated\":false,\"literal\":false}}<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">date_field_query ( Created date after May 5 2015 ) :<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"> "<a href="http://localhost:4567/repositories/2/search?page=1&aq=%7b\">http://localhost:4567/repositories/2/search?page=1&aq={\</a>"query\":{\"field\":\"create_time\",\"value\":\"2015-05-05\",\"comparator\":\"greater_than\",\"jsonmodel_type\":\"date_field_query\"},\"jsonmodel_type\":\"advanced_query\"}"<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"> Does that help?
<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">b,chris.
<o:p></o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<div id="Signature">
<div name="divtagdefaultwrapper">
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:black">Chris Fitzpatrick | Developer, ArchivesSpace<br>
Skype: chrisfitzpat | Phone: 918.236.6048<br>
<a href="http://archivesspace.org/">http://archivesspace.org/</a><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center;background:white">
<span style="font-family:"Calibri",sans-serif;color:black">
<hr size="2" width="98%" align="center">
</span></div>
<div id="divRplyFwdMsg">
<p class="MsoNormal" style="background:white"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">archivesspace_users_group-bounces@lyralists.lyrasis.org</a> <<a href="mailto:archivesspace_users_group-bounces@lyralists.lyrasis.org">archivesspace_users_group-bounces@lyralists.lyrasis.org</a>>
on behalf of Smith, Steelsen <<a href="mailto:steelsen.smith@yale.edu">steelsen.smith@yale.edu</a>><br>
<b>Sent:</b> Sunday, May 17, 2015 2:41 AM<br>
<b>To:</b> Archivesspace Users Group<br>
<b>Subject:</b> [Archivesspace_Users_Group] Advanced Search for API</span><span style="font-family:"Calibri",sans-serif;color:black">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Hi All,<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">The Rest API Endpoint repositories/:id/search indicates that there’s an advanced search input that requires a json formatted “advanced
search” in the URI. Does anyone have an example of what it might look like, or a field list of what can be searched for? I’m trying to perform some very specific searches and am finding myself pulling in a lot of extra information and working through it. A
more general question, is there better API documentation somewhere than exists in the autodocs? Sample strings would save a lot of time from the trial and error process I’m using now.<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Steelsen<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" align="right" style="text-align:right;background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">___________________________<br>
Steelsen Smith<br>
Fulfillment Systems Specialist<o:p></o:p></span></p>
<p class="MsoNormal" align="right" style="text-align:right;background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Enterprise Systems Group<o:p></o:p></span></p>
<p class="MsoNormal" align="right" style="text-align:right;background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Yale Library IT<br>
203.432.3333<o:p></o:p></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>