Skip to content

Commit df65c59

Browse files
author
keming.hh
committed
issue mongodb#410:Completed Translation
1 parent 27c0c1f commit df65c59

File tree

1 file changed

+53
-37
lines changed

1 file changed

+53
-37
lines changed

locale/zh/LC_MESSAGES/faq/indexes.po

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ msgstr ""
44
"Project-Id-Version: mongodb-manual 2.6\n"
55
"Report-Msgid-Bugs-To: \n"
66
"POT-Creation-Date: 2014-09-03 15:39-0400\n"
7-
"PO-Revision-Date: 2015-01-28 19:02+0800\n"
7+
"PO-Revision-Date: 2015-11-27 23:19+0800\n"
88
"Last-Translator: cwfan <[email protected]>\n"
9-
"Language-Team: LANGUAGE <[email protected]>\n"
109
"MIME-Version: 1.0\n"
1110
"Content-Type: text/plain; charset=UTF-8\n"
1211
"Content-Transfer-Encoding: 8bit\n"
1312
"Plural-Forms: nplurals=1; plural=0;\n"
1413
"Language: zh_CN\n"
15-
"X-Generator: Poedit 1.7.3\n"
14+
"X-Generator: Poedit 1.8.6\n"
15+
"Language-Team: \n"
1616

1717
#: ../source/faq/indexes.txt:3
1818
msgid "FAQ: Indexes"
@@ -29,22 +29,22 @@ msgid ""
2929
"List <https://groups.google.com/forum/?fromgroups#!forum/mongodb-user>`_. "
3030
"See also :doc:`/administration/indexes`."
3131
msgstr ""
32-
"如果没有找到你想要的答案,请查看 :doc:`complete list of FAQs </faq>` 或者把你"
33-
"的问题提交到 `MongoDB User Mailing List <https://groups.google.com/forum/?"
34-
"fromgroups#!forum/mongodb-user>`_ 。 请参见 :doc:`/administration/"
32+
"如果没有找到你想要的答案,请查看 :doc:`complete list of FAQs </faq>` 或者把"
33+
"你的问题提交到 `MongoDB User Mailing List <https://groups.google.com/forum/?"
34+
"fromgroups#!forum/mongodb-user>`_ 。 也可以参考 :doc:`/administration/"
3535
"indexes` 。"
3636

3737
#: ../source/faq/indexes.txt:15
3838
msgid "Should you run ``ensureIndex()`` after every insert?"
39-
msgstr "你是否每次安装完都要执行 ``ensureIndex()`` ?"
39+
msgstr "是否需要在每次写入数据后都运行 ``ensureIndex()`` ?"
4040

4141
#: ../source/faq/indexes.txt:17
4242
msgid ""
4343
"No. You only need to create an index once for a single collection. After "
4444
"initial creation, MongoDB automatically updates the index as data changes."
4545
msgstr ""
46-
"现在只需在首次创建的时候为单集合创建一次索引,MongoDB会在数据修改时自动更新"
47-
"索引"
46+
"不需要,对于单个集合你只需要创建一次索引。在创建完成后,MongoDB会随着数据改"
47+
"变而自动更新索引。"
4848

4949
#: ../source/faq/indexes.txt:21
5050
msgid ""
@@ -55,22 +55,23 @@ msgid ""
5555
"inaccessible as the index creation is happening. See :ref:`index-building-"
5656
"replica-sets`."
5757
msgstr ""
58-
"通常当执行完 :method:`~db.collection.ensureIndex()` ,索引还不存在,因为后台"
59-
"的工作还在进行中, 这时如果调用 :method:`~db.collection.ensureIndex()` 将破坏"
60-
"数据库的完整性, 创建索引时可以执行 :method:`~db.collection.ensureIndex()` "
61-
"使复制集无法访问。 参见 :ref:`index-building-replica-sets` 。"
58+
"尽管通常情况下执行 :method:`~db.collection.ensureIndex()` 是没有问题的,但是"
59+
"如果一个索引因为持续运行的后台管理工作而没有生成, 这时如果调用 :method:`~db."
60+
"collection.ensureIndex()` 将破坏数据库的可用性。运行命令 :method:`~db."
61+
"collection.ensureIndex()` 创建索引期间复制集会无法读写。 参见 :ref:`index-"
62+
"building-replica-sets` 。"
6263

6364
#: ../source/faq/indexes.txt:29
6465
msgid "How do you know what indexes exist in a collection?"
65-
msgstr "如何查看集合中已有的索引?"
66+
msgstr "如何查看集合中已存在哪些索引?"
6667

6768
#: ../source/faq/indexes.txt:31
6869
msgid ""
6970
"To list a collection's indexes, use the :method:`db.collection."
7071
"getIndexes()` method or a similar :api:`method for your driver <>`."
7172
msgstr ""
72-
"使用 :method:`db.collection.getIndexes()` 方法或类似的 :api:`method for your "
73-
"driver <>` 。"
73+
"使用 :method:`db.collection.getIndexes()` 方法或你所使用的驱动上的类似 :api:"
74+
"`method for your driver <>` 可以列出一个集合上的已创建的所有索引。"
7475

7576
#: ../source/faq/indexes.txt:36
7677
msgid "How do you determine the size of an index?"
@@ -80,11 +81,12 @@ msgstr "你要如何确定索引的大小?"
8081
msgid ""
8182
"To check the sizes of the indexes on a collection, use :method:`db."
8283
"collection.stats()`."
83-
msgstr "检查集合的索引大小,使用 :method:`db.collection.stats()` 。"
84+
msgstr ""
85+
"使用命令 :method:`db.collection.stats()` 可以检查集合上的索引所占空间大小。"
8486

8587
#: ../source/faq/indexes.txt:43
8688
msgid "What happens if an index does not fit into RAM?"
87-
msgstr "如果索引不匹配内存会空间发生什么?"
89+
msgstr "如果索引不能被装载到内存空间会发生什么?"
8890

8991
#: ../source/faq/indexes.txt:45
9092
msgid ""
@@ -93,34 +95,34 @@ msgid ""
9395
"mind an index fits into RAM when your server has RAM available for the "
9496
"index combined with the rest of the :term:`working set`."
9597
msgstr ""
96-
"如果索引过大而不匹配RAM,则MongoDB必须从硬盘读取索引,而硬盘读取索引要远比从"
97-
"内存读取慢得多。记住,索引匹配的内存包含你的服务器可用于索引的内存空间和剩余"
98-
" :term:`working set` "
98+
"如果索引所占存储空间过大而不能被加载到内存中,MongoDB必须从硬盘读取索引,而"
99+
"硬盘读取索引要远比从内存读取慢得多。注意,索引匹配内存是指你的服务器对索引和"
100+
"其它工作集的组合有足够的可用内存空间 :term:`working set` "
99101

100102
#: ../source/faq/indexes.txt:50
101103
msgid ""
102104
"In certain cases, an index does not need to fit *entirely* into RAM. For "
103105
"details, see :ref:`indexing-right-handed`."
104106
msgstr ""
105-
"在某些情况下,索引不必 *完全* 匹配RAM,详细内容参见 :ref:`indexing-right-"
107+
"在某些情况下,索引不必 *完全* 加载到RAM,详细内容参见 :ref:`indexing-right-"
106108
"handed` 。"
107109

108110
#: ../source/faq/indexes.txt:56
109111
msgid "How do you know what index a query used?"
110-
msgstr "如何知道查询使用了哪个索引?"
112+
msgstr "如何知道一次查询使用了哪个索引?"
111113

112114
#: ../source/faq/indexes.txt:58
113115
msgid ""
114116
"To inspect how MongoDB processes a query, use the :method:`~cursor."
115117
"explain()` method in the :program:`mongo` shell, or in your application "
116118
"driver."
117119
msgstr ""
118-
"要检查MongoDB是如何处理查询,在 :program:`mongo` 控制台或者通过你的驱动程序"
120+
"要观察MongoDB是如何处理查询,在 :program:`mongo` shell或在你使用的应用驱动中"
119121
"调用 :method:`~cursor.explain()` 。"
120122

121123
#: ../source/faq/indexes.txt:63
122124
msgid "How do you determine what fields to index?"
123-
msgstr "如何确定哪个字段要用索引?"
125+
msgstr "如何确定在哪些字段上建立索引?"
124126

125127
#: ../source/faq/indexes.txt:65
126128
msgid ""
@@ -130,6 +132,9 @@ msgid ""
130132
"support all the fields in a given query. For detailed documentation on "
131133
"choosing which fields to index, see :doc:`/administration/indexes`."
132134
msgstr ""
135+
"许多因素会决定你在哪些字段上建立索引,包括 :ref:`selectivity <index-"
136+
"selectivity>` ,内存适配,尽可能地在多个查询中重用索引,和支持给定查询中的所"
137+
"有字段。更详细的文档参见 :doc:`/administration/indexes` 。"
133138

134139
#: ../source/faq/indexes.txt:81
135140
msgid "How do write operations affect indexes?"
@@ -143,15 +148,15 @@ msgid ""
143148
"must update all indexes that include this document as part of the update "
144149
"operation."
145150
msgstr ""
146-
"任何更新索引字段的写操作必须更新索引自己而不是文档,如果你更新了一份文档,"
147-
"使文档增长超过所分配的记录大小,该更新操作将导致文档中的全部索引更新。"
151+
"任何改变索引中字段的写操作都会既修改文档本身也更新索引。如果你对文档的更新操"
152+
"作导致文档大小超出了已分配的记录大小,那么MongoDB不仅会修改这个文档,还会更"
153+
"新所有的索引。"
148154

149155
#: ../source/faq/indexes.txt:89
150156
msgid ""
151157
"Therefore, if your application is write-heavy, creating too many indexes "
152158
"might affect performance."
153-
msgstr ""
154-
"因此,如果你的程序写操作非常多,创建过多的索引可能会影响性能。"
159+
msgstr "因此,如果你的程序写操作非常多,创建过多的索引可能会影响性能。"
155160

156161
#: ../source/faq/indexes.txt:93
157162
msgid "Will building a large index affect database performance?"
@@ -165,13 +170,17 @@ msgid ""
165170
"large collection, consider building the index in the background. See :ref:"
166171
"`index-creation-operations`."
167172
msgstr ""
168-
"建立索引可能是一个IO密集型操作,特别是如果你有一个巨大的集合"
173+
"建立索引是一个IO密集型操作,特别是当你的集合很大的时候。包括MySQL在内的所有支"
174+
"持辅助索引的数据库系统都有这种情况。如果你需要在一个大集合上建立索引,可以考"
175+
"虑在后台建立它。参考 :ref:`index-creation-operations` 。"
169176

170177
#: ../source/faq/indexes.txt:101
171178
msgid ""
172179
"If you build a large index without the background option, and if doing so "
173180
"causes the database to stop responding, do one of the following:"
174181
msgstr ""
182+
"如果你创建一个大索引而且没有选择在后台运行,这时如果导致数据库没有响应,可以"
183+
"按照如下方式解决:"
175184

176185
#: ../source/faq/indexes.txt:105
177186
msgid "Wait for the index to finish building."
@@ -181,7 +190,7 @@ msgstr "等待索引构建完成。"
181190
msgid ""
182191
"Kill the current operation (see :method:`db.killOp()`). The partial index "
183192
"will be deleted."
184-
msgstr "中断当前的操作(参见 :method:`db.killOp()`),部分索引将被删除。"
193+
msgstr "中断当前的操作(参见 :method:`db.killOp()` ),部分索引将被删除。"
185194

186195
#: ../source/faq/indexes.txt:113
187196
msgid "Can I use index keys to constrain query matches?"
@@ -194,19 +203,21 @@ msgid ""
194203
"collection.find()` by using index keys."
195204
msgstr ""
196205
"你可以使用 :method:`~cursor.min()` 和 :method:`~cursor.max()` 方法通过索引键"
197-
"来约束从 :method:`~db.collection.find()` 获取的结果。"
206+
"来限制 :method:`~db.collection.find()` 返回的游标的结果集。"
198207

199208
#: ../source/faq/indexes.txt:120
200209
msgid "Using ``$ne`` and ``$nin`` in a query is slow. Why?"
201-
msgstr "为什么在查询中使用 ``$ne`` 和 ``$nin`` 很慢?"
210+
msgstr "为什么使用 ``$ne`` 和 ``$nin`` 会导致查询很慢?"
202211

203212
#: ../source/faq/indexes.txt:122
204213
msgid ""
205214
"The :query:`$ne` and :query:`$nin` operators are not selective. See :ref:"
206215
"`index-selectivity`. If you need to use these, it is often best to make "
207216
"sure that an additional, more selective criterion is part of the query."
208217
msgstr ""
209-
218+
" :query:`$ne` 和 :query:`$nin` 操作不是好的选择。 参见 :ref:`index-"
219+
"selectivity` 。如果你需要使用它们,最好在查询语句中添加额外的更精挑细选的规"
220+
"范。"
210221

211222
#: ../source/faq/indexes.txt:128
212223
msgid "Can I use a multi-key index to support a query for a whole array?"
@@ -219,6 +230,8 @@ msgid ""
219230
"all subsequent items in the array cannot use the index and must scan the "
220231
"documents individually."
221232
msgstr ""
233+
"不完全可行。索引可以部分地支持这种查询,因为索引可以加快数组第一个元素的选"
234+
"择,但是不能用索引去比较数组中所有后续的元素,只能通过单独地扫描文档来完成。"
222235

223236
#: ../source/faq/indexes.txt:136
224237
msgid "How can I effectively use indexes strategy for attribute lookups?"
@@ -231,17 +244,20 @@ msgid ""
231244
"where each document has a field (e.g. ``attrib`` ) that holds a specific "
232245
"type of attribute. You can index this ``attrib`` field."
233246
msgstr ""
247+
"对于不需要对结果集进行排序的查询或范围查询,可以考虑创建一个字段,这个字段包"
248+
"含一个由文档组成的数组,数组中每一个文档都有一个保存指定类型属性的字段(比如 "
249+
"``attrib`` )。你可以索引 ``attrib`` 字段。"
234250

235251
#: ../source/faq/indexes.txt:144
236252
msgid ""
237253
"For example, the ``attrib`` field in the following document allows you to "
238254
"add an unlimited number of attributes types:"
239-
msgstr "例如,下文中的字段 ``attrib`` 允许你添加不限数量的属性类型:"
255+
msgstr "例如,下面文档中的字段 ``attrib`` 允许你添加不限数量的属性类型:"
240256

241257
#: ../source/faq/indexes.txt:158
242258
msgid ""
243259
"*Both* of the following queries could use the same ``{ \"attrib.k\": 1, "
244260
"\"attrib.v\": 1 }`` index:"
245261
msgstr ""
246-
"下面的*全部*查询都可以使用同样的 ``{ \"attrib.k\": 1, \"attrib.v\": 1 }`` "
247-
"索引:"
262+
"下面的 *两个* 查询都可以使用同样的索引 ``{ \"attrib.k\": 1, \"attrib.v\": "
263+
"1 }`` :"

0 commit comments

Comments
 (0)