ricellis opened a new issue, #6216:
URL: https://github.com/apache/couchdb/issues/6216

   ### Version
   
   unknown
   
   ### Describe the problem you're encountering
   
   The new (planned for 3.6?) `POST /{db}/_index_info` endpoint does not use 
the `type` parameter from the request body. (It does work from the URL query 
parameter).
   
   ### Expected Behaviour
   
   To be able to use the `type` parameter within a body to avoid needing to mix 
body and query parameters.
   e.g.
   `{"type":["view"]}`
   
   I also expected the body parameter to be a JSON array even if the query 
parameter is a string as it is more natural for a list of types.
   
   ### Steps to Reproduce
   
   ```sh
    curl -H 'content-type: application/json'  -d '{"type": ["search"]}' 
'https://my.example/animaldb/_index_info'
   ```
   ```json5
   {
     "total_rows": 1,
     "bookmark": null,
     "view_indexes": [ // expected to be empty with type of search
       {
         "ddoc": "_design/views101",
         "views": [
           "complex_count",
           "complex_latin_name_count",
           "diet",
           "diet_count",
           "diet_jscount",
           "diet_sum",
           "latin_name",
           "latin_name_count",
           "latin_name_jssum",
           "latin_name_sum"
         ],
         "ok": true,
         "info": {
           "updates_pending": {
             "minimum": 0,
             "preferred": 0,
             "total": 0,
             "maximum": 0,
             "copies": 48,
             "copies_expected": 48
           },
           "waiting_commit": false,
           "waiting_clients": 0,
           "updater_running": false,
           "update_seq": 16,
           "sizes": {
             "file": 97270,
             "external": 1531,
             "active": 2902
           },
           "signature": "bedc44e56c2ba97902aeaac2b51ad77c",
           "purge_seq": 0,
           "language": "javascript",
           "compact_running": false,
           "collator_versions": [
             "153.128"
           ]
         }
       }
     ],
     "search_indexes": [
       {
         "ddoc": "_design/views101",
         "name": "animals",
         "ok": true,
         "info": {
           "updates_pending": {
             "minimum": 0,
             "preferred": 0,
             "total": 0,
             "maximum": 0,
             "copies": 48,
             "copies_expected": 48
           },
           "signature": "f4c96067e9edeafd9afdf2876740b4cb",
           "pending_seq": 16,
           "doc_del_count": 0,
           "doc_count": 12,
           "disk_size": 18717,
           "committed_seq": 16
         }
       }
     ],
     "nouveau_indexes": []
   }
   ```
   
   ### Your Environment
   
   _No response_
   
   ### Additional Context
   
   FYI @nickva as discussed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to