It looks like your example got a little mangled along the way: I assume what’s 
between the “<…>” doesn’t belong. 
But the ‘-H’ switch sends “q:java” as a HTTP header, not as a search param, so 
with a null query string, you are asking for everything.  

Try maybe: "http://as.lib.msu.edu:8089/search?page=1&page_size=5&q=java 
<http://as.lib.msu.edu:8089/search?page=1&page_size=5&q=java>”

or if you want to send it as a POST instead of a GET request, use  -F or —form 
switch. 

Also, when debugging search problems, it’s sometimes handy to go directly to 
the Solr console at port 8090, if you’re using the default Solr settings in 
ArchivesSpace. 


— Steve.



> On Feb 14, 2018, at 11:45 AM, Tang, Lydia <lta...@lib.msu.edu> wrote:
> 
> Good morning, all!
> I have a mystery…  My institution is trying to pull from the API to integrate 
> the results in our search discovery interface of our catalog.  The mystery is 
> that apparently, our API call seems to bring back bogus results whereas if we 
> scrape from the HTML of the PUI, the search results are as expected.
> Here is the API call
> 
> curl -H "X-ArchivesSpace-Session: 
> c3a1ea6a48af5e9324a19bf1e79d284b921cbc97aed93b143d76b6b457f5b144 " -H 
> "q:java"   
> "http://as.lib.msu.edu:8089//search?page=1&page_size=5<http://as.lib.msu.edu:8089/search?page=1&page_size=5>
>  
> <http://as.lib.msu.edu:8089//search?page=1&page_size=5%3Chttp://as.lib.msu.edu:8089/search?page=1&page_size=5%3E>"
> 
> If you look closely I’m searching for java and I want the 1st page with 5 
> results
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group@lyralists.lyrasis.org
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group

Reply via email to