Skip to content

Commit f6b6c84

Browse files
committed
Update guide/reference/api/admin-indices-create-index.textile
1 parent 7e546e4 commit f6b6c84

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

guide/reference/api/admin-indices-create-index.textile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
layout: guide
3-
title: Create Index API
3+
title: 索引创建 API
44
cat: guide
55
sidebar: reference_api
66
---
77

88
p. The create index API allows to instantiate an index. ElasticSearch provides support for multiple indices, including executing operations across several indices. Each index created can have specific settings associated with it.
9+
索引创建API允许初始化一个索引。 ElasticSearch对多重索引提供了支持,包括跨多个索引执行操作。每个索引在创建时可以让一个特定的设置项与其关联。
910

1011
<pre class="prettyprint">
1112
$ curl -XPUT 'http://localhost:9200/twitter/'
@@ -18,6 +19,7 @@ index :
1819
</pre>
1920

2021
p. The above second example curl shows how an index called @twitter@ can be created with specific settings for it using "YAML":http://www.yaml.org. In this case, creating an index with 3 shards, each with 2 replicas. The index settings can also defined with "JSON":http://www.json.org:
22+
上面第二个curl例子展示了如何创建一个名字叫 @twitter@ 的索引,并且使用 "YAML":http://www.yaml.org 格式为其指定设置项。在这个例子中,我们为该索引配置了三个切片和两个副本。索引设置项也可以通过 "JSON":http://www.json.org 格式指定:
2123

2224
<pre class="prettyprint">
2325
$ curl -XPUT 'http://localhost:9200/twitter/' -d '{
@@ -31,6 +33,7 @@ $ curl -XPUT 'http://localhost:9200/twitter/' -d '{
3133
</pre>
3234

3335
or more simplified
36+
或者简化为
3437

3538
<pre class="prettyprint">
3639
$ curl -XPUT 'http://localhost:9200/twitter/' -d '{
@@ -42,10 +45,13 @@ $ curl -XPUT 'http://localhost:9200/twitter/' -d '{
4245
</pre>
4346

4447
_Note you do not have to explicitly specify @index@ section inside @settings@ section._
48+
_请注意,你不需要在 @settings@ 项中显示的指定 @index@。_
4549

4650
h1. Mappings
51+
映射
4752

4853
p. The create index API allows to provide a set of one or more mappings:
54+
索引创建API可以接收一个或一组映射选项:
4955

5056
<pre class="prettyprint">
5157
curl -XPOST localhost:9200/test -d '{
@@ -64,5 +70,7 @@ curl -XPOST localhost:9200/test -d '{
6470
</pre>
6571

6672
h1. Index Settings
73+
索引设置
6774

6875
p. For more information regarding all the different index level settings that can be set when creating an index, please check the "index modules":/guide/reference/index-modules section.
76+
想要关注更多不同的,可以在索引创建时设置的索引级选项,请看 "index modules":/guide/reference/index-modules 。

0 commit comments

Comments
 (0)