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