[Archivesspace_Users_Group] SOLR/API differences

RENTON Scott Scott.Renton at ed.ac.uk
Fri Aug 20 09:42:18 EDT 2021


Hi folks

Just trying to translate a query worked out in SOLR into an API get request.

Here, I'm trying to use edismax and qf to limit the fields I'm looking in for a term, so we don't get unwanted content coming through:

[base_url]/collection1/select?q=joke&fq=types%3Aarchival_object&rows=1000&fl=title+notes+summary&wt=json&indent=true&defType=edismax&qf=notes%5E300+title%5E100&stopwords=true&lowercaseOperators=true<http://lac-archivesspace-live2.is.ed.ac.uk:8090/collection1/select?q=joke&fq=types%3Aarchival_object&rows=1000&fl=title+notes+summary&wt=json&indent=true&defType=edismax&qf=notes%5E300+title%5E100&stopwords=true&lowercaseOperators=true>

That does seem to work.

When I drop it into the API, though, I notice that fq is ignored (I just move the types into the q, that's ok), fl is ignored (this was just to see things easily, not a big deal), and even with defType=edismax, the all-important qf is ignored. Is that what we'd expect?

My GET looks like this (I took the weightings off the qfs):
[base_url]/repositories/2/search?q=joke AND types:archival_object&rows=1000&fl=title+notes+summary&wt=json&indent=true&defType=edismax&qf=notes+title&stopwords=true&lowercaseOperators=true&page=1


I was under the impression the API and SOLR syntax were interchangeable, but perhaps not?


I've also noticed that I cannot use summary for qf in SOLR. I think this is because it is indexed="false" in schema.xml. Is it likely to be safe to change that and reindex?


Thanks

Scott


==========

Scott Renton

Digital Library Development & Systems

Floor F East

Argyle House

515219

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20210820/42928034/attachment.html>


More information about the Archivesspace_Users_Group mailing list