@@ 213-219 (lines=7) @@ | ||
210 | $options = $mapping['index']; |
|
211 | } |
|
212 | ||
213 | if (isset($mapping['unique'])) { |
|
214 | if (is_array($mapping['unique'])) { |
|
215 | $options = $mapping['unique'] + array('unique' => true); |
|
216 | } else { |
|
217 | $unique = (boolean) $mapping['unique']; |
|
218 | } |
|
219 | } |
|
220 | ||
221 | if (isset($mapping['sparse'])) { |
|
222 | if (is_array($mapping['sparse'])) { |
|
@@ 221-227 (lines=7) @@ | ||
218 | } |
|
219 | } |
|
220 | ||
221 | if (isset($mapping['sparse'])) { |
|
222 | if (is_array($mapping['sparse'])) { |
|
223 | $options = $mapping['sparse'] + array('sparse' => true); |
|
224 | } else { |
|
225 | $sparse = (boolean) $mapping['sparse']; |
|
226 | } |
|
227 | } |
|
228 | ||
229 | if (isset($unique)) { |
|
230 | $options['unique'] = $unique; |