In apachesolr_fields_default_indexing_callback(...) we take a copy of the first value of the field and store it in a singular index. This works great for multi-value fields ($field_info['multiple'] == true), but results in us trying to index the same field twice with the same name if the field is already singular.
My patch add a check for $field_info['multiple'] to prevent this and makes the code a little easier to read by moving code that's designed to execute 0 or 1 times out of the for loop.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1708212-2.patch | 1.19 KB | nick_vh |
| #1 | apachesolr-fix_single_value_indexing-1708212-1.patch | 1001 bytes | ianthomas_uk |
Comments
Comment #1
ianthomas_ukAnd here's the patch (my last for now)
Comment #2
nick_vhI had some whitespace issues with your patch
Comment #3
nick_vhcommitted to 7.x-1.x
Comment #4
ianthomas_ukComment #5
nick_vhcould be cleany applied and works