Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add parameter to create_index #2791

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion site/en/userGuide/manage-indexes/index-vector-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ index_params.add_index(
# 4.3. Create an index file
client.create_index(
collection_name="customized_setup",
index_params=index_params
index_params=index_params,
sync=False # Whether to wait for index creation to complete before returning. Defaults to True.
)
```

Expand Down Expand Up @@ -335,6 +336,10 @@ console.log(res.error_code)
<td><code>index_params</code></td>
<td>An <strong>IndexParams</strong> object containing a list of <strong>IndexParam</strong> objects.</td>
</tr>
<tr>
<td><code>sync</code></td>
<td>Controls how the index is built in relation to the client’s request. Valid values:<br><ul><li><code>True</code> (default): The client waits until the index is fully built before it returns. This means you will not get a response until the process is complete.</li><li><code>False</code>: The client returns immediately after the request is received and the index is being built in the background. To find out if index creation has been completed, use the <a href="https://milvus.io/api-reference/pymilvus/v2.4.x/MilvusClient/Management/describe_index.md">describe_index()</a> method.</li></ul></td>
</tr>
</tbody>
</table>

Expand Down