Skip to content

Commit

Permalink
Generate en docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Milvus-doc-bot authored and Milvus-doc-bot committed Nov 13, 2024
1 parent 7db21fd commit 40ab106
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"codeList":["# Auto indexing\nclient = MilvusClient(\n uri=\"http://localhost:19530\"\n)\n\nindex_params = client.create_index_params() # Prepare an empty IndexParams object, without having to specify any index parameters\n\nindex_params.add_index(\n field_name=\"scalar_1\", # Name of the scalar field to be indexed\n index_type=\"\", # Type of index to be created. For auto indexing, leave it empty or omit this parameter.\n index_name=\"default_index\" # Name of the index to be created\n)\n\nclient.create_index(\n collection_name=\"test_scalar_index\", # Specify the collection name\n index_params=index_params\n)\n","import io.milvus.v2.common.IndexParam;\nimport io.milvus.v2.service.index.request.CreateIndexReq;\n\nIndexParam indexParamForScalarField = IndexParam.builder()\n .fieldName(\"scalar_1\") // Name of the scalar field to be indexed\n .indexName(\"default_index\") // Name of the index to be created\n .indexType(\"\") // Type of index to be created. For auto indexing, leave it empty or omit this parameter.\n .build();\n\nList<IndexParam> indexParams = new ArrayList<>();\nindexParams.add(indexParamForVectorField);\n\nCreateIndexReq createIndexReq = CreateIndexReq.builder()\n .collectionName(\"test_scalar_index\") // Specify the collection name\n .indexParams(indexParams)\n .build();\n\nclient.createIndex(createIndexReq);\n","await client.createIndex({\n collection_name: \"test_scalar_index\", // Specify the collection name\n field_name: \"scalar_1\", // Name of the scalar field to be indexed\n index_name: \"default_index\", // Name of the index to be created\n index_type: \"\" // Type of index to be created. For auto indexing, leave it empty or omit this parameter.\n})\n","index_params = client.create_index_params() # Prepare an IndexParams object\n\nindex_params.add_index(\n field_name=\"scalar_2\", # Name of the scalar field to be indexed\n index_type=\"INVERTED\", # Type of index to be created\n index_name=\"inverted_index\" # Name of the index to be created\n)\n\nclient.create_index(\n collection_name=\"test_scalar_index\", # Specify the collection name\n index_params=index_params\n)\n","import io.milvus.v2.common.IndexParam;\nimport io.milvus.v2.service.index.request.CreateIndexReq;\n\nIndexParam indexParamForScalarField = IndexParam.builder()\n .fieldName(\"scalar_1\") // Name of the scalar field to be indexed\n .indexName(\"inverted_index\") // Name of the index to be created\n .indexType(\"INVERTED\") // Type of index to be created\n .build();\n\nList<IndexParam> indexParams = new ArrayList<>();\nindexParams.add(indexParamForVectorField);\n\nCreateIndexReq createIndexReq = CreateIndexReq.builder()\n .collectionName(\"test_scalar_index\") // Specify the collection name\n .indexParams(indexParams)\n .build();\n\nclient.createIndex(createIndexReq);\n","await client.createIndex({\n collection_name: \"test_scalar_index\", // Specify the collection name\n field_name: \"scalar_1\", // Name of the scalar field to be indexed\n index_name: \"inverted_index\", // Name of the index to be created\n index_type: \"INVERTED\" // Type of index to be created\n})\n","client.list_indexes(\n collection_name=\"test_scalar_index\" # Specify the collection name\n)\n\n# Output:\n# ['default_index','inverted_index']\n","import java.util.List;\nimport io.milvus.v2.service.index.request.ListIndexesReq;\n\nListIndexesReq listIndexesReq = ListIndexesReq.builder()\n .collectionName(\"test_scalar_index\") // Specify the collection name\n .build();\n\nList<String> indexNames = client.listIndexes(listIndexesReq);\n\nSystem.out.println(indexNames);\n\n// Output:\n// [\n// \"default_index\",\n// \"inverted_index\"\n// ]\n","res = await client.listIndexes({\n collection_name: 'test_scalar_index'\n})\n\nconsole.log(res.indexes)\n\n// Output:\n// [\n// \"default_index\",\n// \"inverted_index\"\n// ] \n"],"headingContent":"Index Scalar Fields","anchorList":[{"label":"Index Scalar Fields","href":"Index-Scalar-Fields","type":1,"isActive":false},{"label":"Types of scalar indexing","href":"Types-of-scalar-indexing","type":2,"isActive":false},{"label":"Auto indexing","href":"Auto-indexing","type":2,"isActive":false},{"label":"Custom indexing","href":"Custom-indexing","type":2,"isActive":false},{"label":"Verifying the result","href":"Verifying-the-result","type":2,"isActive":false},{"label":"Limits","href":"Limits","type":2,"isActive":false}]}
{"codeList":["# Auto indexing\nclient = MilvusClient(\n uri=\"http://localhost:19530\"\n)\n\nindex_params = MilvusClient.prepare_index_params() # Prepare an empty IndexParams object, without having to specify any index parameters\n\nindex_params.add_index(\n field_name=\"scalar_1\", # Name of the scalar field to be indexed\n index_type=\"\", # Type of index to be created. For auto indexing, leave it empty or omit this parameter.\n index_name=\"default_index\" # Name of the index to be created\n)\n\nclient.create_index(\n collection_name=\"test_scalar_index\", # Specify the collection name\n index_params=index_params\n)\n","import io.milvus.v2.common.IndexParam;\nimport io.milvus.v2.service.index.request.CreateIndexReq;\n\nIndexParam indexParamForScalarField = IndexParam.builder()\n .fieldName(\"scalar_1\") // Name of the scalar field to be indexed\n .indexName(\"default_index\") // Name of the index to be created\n .indexType(\"\") // Type of index to be created. For auto indexing, leave it empty or omit this parameter.\n .build();\n\nList<IndexParam> indexParams = new ArrayList<>();\nindexParams.add(indexParamForVectorField);\n\nCreateIndexReq createIndexReq = CreateIndexReq.builder()\n .collectionName(\"test_scalar_index\") // Specify the collection name\n .indexParams(indexParams)\n .build();\n\nclient.createIndex(createIndexReq);\n","await client.createIndex({\n collection_name: \"test_scalar_index\", // Specify the collection name\n field_name: \"scalar_1\", // Name of the scalar field to be indexed\n index_name: \"default_index\", // Name of the index to be created\n index_type: \"\" // Type of index to be created. For auto indexing, leave it empty or omit this parameter.\n})\n","index_params = MilvusClient.prepare_index_params() # Prepare an IndexParams object\n\nindex_params.add_index(\n field_name=\"scalar_2\", # Name of the scalar field to be indexed\n index_type=\"INVERTED\", # Type of index to be created\n index_name=\"inverted_index\" # Name of the index to be created\n)\n\nclient.create_index(\n collection_name=\"test_scalar_index\", # Specify the collection name\n index_params=index_params\n)\n","import io.milvus.v2.common.IndexParam;\nimport io.milvus.v2.service.index.request.CreateIndexReq;\n\nIndexParam indexParamForScalarField = IndexParam.builder()\n .fieldName(\"scalar_1\") // Name of the scalar field to be indexed\n .indexName(\"inverted_index\") // Name of the index to be created\n .indexType(\"INVERTED\") // Type of index to be created\n .build();\n\nList<IndexParam> indexParams = new ArrayList<>();\nindexParams.add(indexParamForVectorField);\n\nCreateIndexReq createIndexReq = CreateIndexReq.builder()\n .collectionName(\"test_scalar_index\") // Specify the collection name\n .indexParams(indexParams)\n .build();\n\nclient.createIndex(createIndexReq);\n","await client.createIndex({\n collection_name: \"test_scalar_index\", // Specify the collection name\n field_name: \"scalar_1\", // Name of the scalar field to be indexed\n index_name: \"inverted_index\", // Name of the index to be created\n index_type: \"INVERTED\" // Type of index to be created\n})\n","client.list_indexes(\n collection_name=\"test_scalar_index\" # Specify the collection name\n)\n\n# Output:\n# ['default_index','inverted_index']\n","import java.util.List;\nimport io.milvus.v2.service.index.request.ListIndexesReq;\n\nListIndexesReq listIndexesReq = ListIndexesReq.builder()\n .collectionName(\"test_scalar_index\") // Specify the collection name\n .build();\n\nList<String> indexNames = client.listIndexes(listIndexesReq);\n\nSystem.out.println(indexNames);\n\n// Output:\n// [\n// \"default_index\",\n// \"inverted_index\"\n// ]\n","res = await client.listIndexes({\n collection_name: 'test_scalar_index'\n})\n\nconsole.log(res.indexes)\n\n// Output:\n// [\n// \"default_index\",\n// \"inverted_index\"\n// ] \n"],"headingContent":"Index Scalar Fields","anchorList":[{"label":"Index Scalar Fields","href":"Index-Scalar-Fields","type":1,"isActive":false},{"label":"Types of scalar indexing","href":"Types-of-scalar-indexing","type":2,"isActive":false},{"label":"Auto indexing","href":"Auto-indexing","type":2,"isActive":false},{"label":"Custom indexing","href":"Custom-indexing","type":2,"isActive":false},{"label":"Verifying the result","href":"Verifying-the-result","type":2,"isActive":false},{"label":"Limits","href":"Limits","type":2,"isActive":false}]}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ client = MilvusClient(
uri=<span class="hljs-string">&quot;http://localhost:19530&quot;</span>
)

index_params = client.create_index_params() <span class="hljs-comment"># Prepare an empty IndexParams object, without having to specify any index parameters</span>
index_params = MilvusClient.prepare_index_params() <span class="hljs-comment"># Prepare an empty IndexParams object, without having to specify any index parameters</span>

index_params.add_index(
field_name=<span class="hljs-string">&quot;scalar_1&quot;</span>, <span class="hljs-comment"># Name of the scalar field to be indexed</span>
Expand Down Expand Up @@ -145,7 +145,7 @@ client.createIndex(createIndexReq);
<a href="#java">Java</a>
<a href="#javascript">Node.js</a>
</div>
<pre><code translate="no" class="language-python">index_params = client.create_index_params() <span class="hljs-comment"># Prepare an IndexParams object</span>
<pre><code translate="no" class="language-python">index_params = MilvusClient.prepare_index_params() <span class="hljs-comment"># Prepare an IndexParams object</span>

index_params.add_index(
field_name=<span class="hljs-string">&quot;scalar_2&quot;</span>, <span class="hljs-comment"># Name of the scalar field to be indexed</span>
Expand Down Expand Up @@ -187,7 +187,7 @@ client.createIndex(createIndexReq);
<div class="language-python">
<p><strong>Methods and Parameters</strong></p>
<ul>
<li><p><strong>create_index_params()</strong></p>
<li><p><strong>prepare_index_params()</strong></p>
<p>Prepares an <strong>IndexParams</strong> object.</p></li>
<li><p><strong>add_index()</strong></p>
<p>Adds index configurations to the <strong>IndexParams</strong> object.</p>
Expand Down
Loading

0 comments on commit 40ab106

Please sign in to comment.