@@ 205-211 (lines=7) @@ | ||
202 | $options = $mapping['index']; |
|
203 | } |
|
204 | ||
205 | if (isset($mapping['unique'])) { |
|
206 | if (is_array($mapping['unique'])) { |
|
207 | $options = $mapping['unique'] + array('unique' => true); |
|
208 | } else { |
|
209 | $unique = (boolean) $mapping['unique']; |
|
210 | } |
|
211 | } |
|
212 | ||
213 | if (isset($mapping['sparse'])) { |
|
214 | if (is_array($mapping['sparse'])) { |
|
@@ 213-219 (lines=7) @@ | ||
210 | } |
|
211 | } |
|
212 | ||
213 | if (isset($mapping['sparse'])) { |
|
214 | if (is_array($mapping['sparse'])) { |
|
215 | $options = $mapping['sparse'] + array('sparse' => true); |
|
216 | } else { |
|
217 | $sparse = (boolean) $mapping['sparse']; |
|
218 | } |
|
219 | } |
|
220 | ||
221 | if (isset($unique)) { |
|
222 | $options['unique'] = $unique; |