@@ -8,7 +8,7 @@ permalink: /documents/searching
8
8
9
9
The [ POST /v1/search endpoint] ( https://docs.marklogic.com/REST/POST/v1/search ) in the MarkLogic REST API supports
10
10
returning 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
12
12
HTTP response. The MarkLogic Python client simplifies use of this operation by returning a list of ` Document ` instances
13
13
via the ` client.documents.search ` method.
14
14
@@ -139,9 +139,10 @@ assert docs[0].content is None
139
139
assert docs[1].content is None
140
140
```
141
141
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
144
143
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:
145
146
146
147
```
147
148
docs = client.documents.search("example", params={"database": "Documents"})
@@ -150,6 +151,6 @@ assert len(docs) == 2
150
151
151
152
## Error handling
152
153
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