<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<p>I think the idea is that there is a lot of documentation and many
examples of Solr queries available online, and that's what most
people use to when searching via the API. You can build
AdvancedSearch objects, which the backend will convert to Solr
queries, but it is more difficult and less powerful.<br>
</p>
<p><br>
</p>
<p>I'm not entirely clear what you are trying to achieve with your
chained-terms query, but one thing I can suggest is that the
square brackets aren't needed between agents and :Collinson. That
is inside the q parameter, hence part of the the Solr query you
are telling ArchivesSpace to pass on to Solr, and multi-valued
fields aren't searched any differently than single-value ones in
Solr queries.</p>
<p><br>
</p>
<p>Dates applicable to the item (rather than the record) are indexed
in a "dates" multi-valued field in Solr, but without anything to
indicate which dates have the label "Creation". If, by policy, you
only ever catalogue creation dates, you could do a Solr range
search on that, but that would be quite restrictive on
cataloguers. Searching the "json" field isn't an option (it isn't
indexed for starters) but your client script could parse it and
discard records that don't match your date criteria (it depends
what you are doing whether that it practical.) Probably what I'd
do is customize the indexer so that it populates a new, dedicated
Solr index field just with creation dates. That way, after a
re-index, you'd be able to do Solr range queries on that. That
isn't too difficult to set up, in a plug-in, but it has an ongoing
maintenance cost of having to test it still works every time you
upgrade ArchivesSpace.<br>
</p>
<p><br>
</p>
<p>Also, when experimenting with queries in the Solr admin
interface, remember to select "edismax" because that is the query
parser which ArchivesSpace uses by default. It doesn't just give
more options, but also changes the way "q" and "fq" are
interpreted (although not radically, in most cases.)</p>
<p><br>
</p>
<p>Andrew.</p>
<p><br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 16/06/2021 16:15, RENTON Scott
wrote:<br>
</div>
<blockquote type="cite" cite="mid:AS8PR05MB7624AB02C9683E9DF4F6B754BA0F9@AS8PR05MB7624.eurprd05.prod.outlook.com">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Hi again folks</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
I'm wondering if anyone has any detailed documentation for the
search API, with some examples. The git resource is really good,
but it doesn't go that deeply into search, and I'm trying to
write something for internal users interfacing with the API.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Issues I'm trying to resolve most directly- chaining terms with
agents, and working with dates (I can do some of this with the
SOLR admin panel, but there are some differences between the
syntax, and I'm falling down there).</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Chaining terms:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
Running something like this:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<span style="font-weight: 400; font-family: OpenSans, Helvetica,
Arial, sans-serif; font-size: 12px; orphans: 2; text-align:
left; widows: 2; color: rgb(80, 80, 80); background-color:
rgb(250, 250, 250); display: inline !important;">search?type[]=archival_object&page=
1&q=language_enum_<a class="moz-txt-link-freetext" href="s:gla">s:gla</a> AND <a class="moz-txt-link-freetext" href="title:Loch">title:Loch</a> AND
certainty_enum_<a class="moz-txt-link-freetext" href="s:approximate">s:approximate</a> AND agents[]:Collinson</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
255, 255);">
<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
It all looks good till I get to the agents- where I get some
records back which don't have that agent. Is there an easy fix
there?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Dates:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
I'd like to be able to search where a Date of Creation is
greater than X but less than Y. However, as that field is in
the json object returned by Search, I don't think I can
logically perform that search (as I'd basically be wildcard
matching a string)- unless there's a way to drill into the
json?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Any advice gratefully received!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Thanks</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Scott</div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:
12pt; font-family: Calibri, Helvetica, sans-serif; color:
rgb(0, 0, 0);">
<p style="margin-top: 0px; margin-bottom:
0px;margin-top:0px; margin-bottom:0px; margin-top:0;
margin-bottom:0">
==========</p>
<p style="margin-top: 0px; margin-bottom:
0px;margin-top:0px; margin-bottom:0px; margin-top:0;
margin-bottom:0">
Scott Renton</p>
<p style="margin-top: 0px; margin-bottom:
0px;margin-top:0px; margin-bottom:0px; margin-top:0;
margin-bottom:0">
Digital Library Development & Systems</p>
<p style="margin-top: 0px; margin-bottom:
0px;margin-top:0px; margin-bottom:0px; margin-top:0;
margin-bottom:0">
Floor F East</p>
<p style="margin-top: 0px; margin-bottom:
0px;margin-top:0px; margin-bottom:0px; margin-top:0;
margin-bottom:0">
Argyle House</p>
<p style="margin-top: 0px; margin-bottom:
0px;margin-top:0px; margin-bottom:0px; margin-top:0;
margin-bottom:0">
515219</p>
</div>
</div>
</div>
</div>
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336. Is e buidheann
carthannais a th’ ann an Oilthigh Dhùn Èideann, clàraichte an
Alba, àireamh clàraidh SC005336.
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Archivesspace_Users_Group mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a>
<a class="moz-txt-link-freetext" href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a>
</pre>
</blockquote>
</body>
</html>