| @@ 228-234 (lines=7) @@ | ||
| 225 | $options = $mapping['index']; |
|
| 226 | } |
|
| 227 | ||
| 228 | if (isset($mapping['unique'])) { |
|
| 229 | if (is_array($mapping['unique'])) { |
|
| 230 | $options = $mapping['unique'] + array('unique' => true); |
|
| 231 | } else { |
|
| 232 | $unique = (boolean) $mapping['unique']; |
|
| 233 | } |
|
| 234 | } |
|
| 235 | ||
| 236 | if (isset($mapping['sparse'])) { |
|
| 237 | if (is_array($mapping['sparse'])) { |
|
| @@ 236-242 (lines=7) @@ | ||
| 233 | } |
|
| 234 | } |
|
| 235 | ||
| 236 | if (isset($mapping['sparse'])) { |
|
| 237 | if (is_array($mapping['sparse'])) { |
|
| 238 | $options = $mapping['sparse'] + array('sparse' => true); |
|
| 239 | } else { |
|
| 240 | $sparse = (boolean) $mapping['sparse']; |
|
| 241 | } |
|
| 242 | } |
|
| 243 | ||
| 244 | if (isset($unique)) { |
|
| 245 | $options['unique'] = $unique; |
|