You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/10/13 10:54:40 UTC

[GitHub] [couchdb-documentation] b0wter opened a new pull request #601: Update for POST /{db}/_index

b0wter opened a new pull request #601:
URL: https://github.com/apache/couchdb-documentation/pull/601


   ## Overview
   
   I am opening this pr in reference to #598 
   I've updated the following:
   
   1. added a missing status code (404) 
   2. removed `partial_filter_selector` from the query parameters (since it should be a property of the `index` parameter)
   3. updated the `index` query parameter (it is no longer a list of strings but a json object)
   4. changed the example that showcases the use of all query parameters
   
   ## Testing recommendations
   
   Use any tool to send a http request to couchdb using the example given in the pr. I've tested it with Couch DB 3.1.1 and get the following response:
   ```
   result": "exists",
       "id": "_design/example-ddoc",
       "name": "example-index"
   }
   ```
   (I've run multiple tests that's why the index already exists)
   
   ## Checklist
   
   - [ ] Update [rebar.config.script](https://github.com/apache/couchdb/blob/master/rebar.config.script) with the commit hash once this PR is rebased and merged
   <!-- Before opening the PR, consider running `make check` locally for a faster turnaround time -->
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-documentation] b0wter commented on a change in pull request #601: Update for POST /{db}/_index

Posted by GitBox <gi...@apache.org>.
b0wter commented on a change in pull request #601:
URL: https://github.com/apache/couchdb-documentation/pull/601#discussion_r533126657



##########
File path: src/api/database/find.rst
##########
@@ -987,12 +984,18 @@ built using MapReduce Views.
     :code 200: Index created successfully or already exists
     :code 400: Invalid request
     :code 401: Admin permission required
+    :code 404: Database not found
     :code 500: Execution error
 
 **Index object format for JSON type indexes**
 
-The index object is a JSON array of field names following the :ref:`sort
-syntax <find/sort>`. Nested fields are also allowed, e.g. `"person.name"`.
+The index object is a JSON object with the following fields:
+
+-  ``fields``: array of field names following the :ref:`sort

Review comment:
       I've updated the PR. Here is a screenshot of what the new part looks like:
   
   ![image](https://user-images.githubusercontent.com/614261/100710804-9612b080-33b0-11eb-8eae-c335b938d4ac.png)
   
   Let me know if this is not the way it's supposed to be :)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-documentation] wohali commented on pull request #601: Update for POST /{db}/_index

Posted by GitBox <gi...@apache.org>.
wohali commented on pull request #601:
URL: https://github.com/apache/couchdb-documentation/pull/601#issuecomment-736710912


   Thanks @b0wter !


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-documentation] wohali commented on a change in pull request #601: Update for POST /{db}/_index

Posted by GitBox <gi...@apache.org>.
wohali commented on a change in pull request #601:
URL: https://github.com/apache/couchdb-documentation/pull/601#discussion_r532942552



##########
File path: src/api/database/find.rst
##########
@@ -987,12 +984,18 @@ built using MapReduce Views.
     :code 200: Index created successfully or already exists
     :code 400: Invalid request
     :code 401: Admin permission required
+    :code 404: Database not found
     :code 500: Execution error
 
 **Index object format for JSON type indexes**
 
-The index object is a JSON array of field names following the :ref:`sort
-syntax <find/sort>`. Nested fields are also allowed, e.g. `"person.name"`.
+The index object is a JSON object with the following fields:
+
+-  ``fields``: array of field names following the :ref:`sort

Review comment:
       This section should be formatted similar to this: 
   
   https://github.com/apache/couchdb-documentation/blame/main/src/api/server/common.rst#L644-L658
   
   Use the same `:json ...` type structure so that all of the fields render correctly.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb-documentation] wohali merged pull request #601: Update for POST /{db}/_index

Posted by GitBox <gi...@apache.org>.
wohali merged pull request #601:
URL: https://github.com/apache/couchdb-documentation/pull/601


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org