@@ 219-225 (lines=7) @@ | ||
216 | $options = $mapping['index']; |
|
217 | } |
|
218 | ||
219 | if (isset($mapping['unique'])) { |
|
220 | if (is_array($mapping['unique'])) { |
|
221 | $options = $mapping['unique'] + array('unique' => true); |
|
222 | } else { |
|
223 | $unique = (boolean) $mapping['unique']; |
|
224 | } |
|
225 | } |
|
226 | ||
227 | if (isset($mapping['sparse'])) { |
|
228 | if (is_array($mapping['sparse'])) { |
|
@@ 227-233 (lines=7) @@ | ||
224 | } |
|
225 | } |
|
226 | ||
227 | if (isset($mapping['sparse'])) { |
|
228 | if (is_array($mapping['sparse'])) { |
|
229 | $options = $mapping['sparse'] + array('sparse' => true); |
|
230 | } else { |
|
231 | $sparse = (boolean) $mapping['sparse']; |
|
232 | } |
|
233 | } |
|
234 | ||
235 | if (isset($unique)) { |
|
236 | $options['unique'] = $unique; |