@@ -8,7 +8,7 @@ permalink: /documents/searching
88
99The [ POST /v1/search endpoint] ( https://docs.marklogic.com/REST/POST/v1/search ) in the MarkLogic REST API supports
1010returning content and metadata for each matching document. Similar to reading multiple documents via the
11- [ GET /v1/documents endpoint] (https://docs.marklogic.com/REST/GET/v1/documents , the data is returned in a multipart
11+ [ GET /v1/documents endpoint] ( https://docs.marklogic.com/REST/GET/v1/documents ) , the data is returned in a multipart
1212HTTP response. The MarkLogic Python client simplifies use of this operation by returning a list of ` Document ` instances
1313via the ` client.documents.search ` method.
1414
@@ -139,9 +139,10 @@ assert docs[0].content is None
139139assert docs[1].content is None
140140```
141141
142- The ` client.documents.search ` method provides a ` **kwargs ` argument, so you can pass in any other arguments you would
143- normally pass to ` requests ` , such as a ` params ` argument that specifies additional parameters:
142+ ## Providing additional arguments
144143
144+ The ` client.documents.search ` method provides a ` **kwargs ` argument, so you can pass in any other arguments you would
145+ normally pass to ` requests ` . For example:
145146
146147```
147148docs = client.documents.search("example", params={"database": "Documents"})
@@ -150,6 +151,6 @@ assert len(docs) == 2
150151
151152## Error handling
152153
153- A POST call to the /v1/search endpoint in MarkLogic will return an HTTP response with a status code of 200 for a
154- successful request . For any other status code, the ` client.documents.search ` method will the ` requests ` ` Response ` object,
155- providing access to the error details returned by MarkLogic.
154+ If the ` client.documents.read ` method receives an HTTP response with a status code of 200, then the client will return
155+ a list of ` Document ` instances . For any other status code, the client will return the ` requests ` ` Response ` object,
156+ providing access to the error details returned by the MarkLogic REST API .
0 commit comments