isamplesorg / isamples_inabox

Provides functionality intermediate to a collection and central
0 stars 1 forks source link

Accept requests for solr select that end with a slash #339

Closed dannymandel closed 9 months ago

dannymandel commented 9 months ago

Fix bug (https://github.com/isamplesorg/isamples_inabox/issues/334) that was requiring @rdhyee to hack around a python solr client library

dannymandel commented 9 months ago

Also fixes https://github.com/isamplesorg/isamples_inabox/issues/338

dannymandel commented 9 months ago

Example of using POST:

mandeld@Daniels-MacBook-Pro isamples_inabox % curl -X POST -H "Content-Type: application/json" -d "{'q': '*:*', 'wt': 'json' }" "http://localhost:8000/thing/select/"
{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":0,
    "params":{
      "q":"*:*",
      "fl":"id",
      "start":"0",
      "rows":"10",
      "wt":"json"}},
  "response":{"numFound":6387537,"start":0,"numFoundExact":true,"docs":[
      {
        "id":"IGSN:IESER000J"},
      {
        "id":"IGSN:IESER000K"},
      {
        "id":"IGSN:IESER000L"},
      {
        "id":"IGSN:IELL10002"},
      {
        "id":"IGSN:IENWU0PBP"},
      {
        "id":"IGSN:IENWU0SDP"},
      {
        "id":"IGSN:IESER0009"},
      {
        "id":"IGSN:IESER0008"},
      {
        "id":"IGSN:IESER0006"},
      {
        "id":"IGSN:IESER000B"}]
  }}
dannymandel commented 9 months ago

This is done and working but the original code is lacking test coverage, so I would like to improve that with this change. Tests coming up later…