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