When trying to index a node with a multi-valued reference field, if one of the fields in the referenced entity is numeric or boolean, the module adds multiple singular index fields, causing a 400 error.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jmoreira created an issue. See original summary.

jmoreira’s picture

Proposed fix:

Identify if the field is supposed to be indexed as multiple or singular and use the appropriate function.
I also replaced the deprecated function setMultiValue to addField.

jmoreira’s picture

Status: Active » Needs review
lpeabody’s picture

Status: Needs review » Reviewed & tested by the community
deepakrmklm’s picture

Thanks jmoreira, This works.

redkelpie’s picture

#2 Worked for the issue I was having with apachesolr_paragraphs indexing

deepakrmklm’s picture

Is their anything that is blocking to get this fix with latest release?

michielnugter’s picture

+1 on the RTBC. The patch looks good and it works.

janusman’s picture

Cleaner patch, will commit next.

  • janusman authored fb539c6 on 7.x-1.x
    Issue #2786477 by jmoreira, janusman: Error: "multiple values...
janusman’s picture

Status: Reviewed & tested by the community » Fixed

Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

lvlte’s picture

Version: 7.x-1.8 » 7.x-1.10

The patch in #9 introduced this issue.

I think it is not correct because it is based on the assumption that only apachesolr default indexing callback is used.

I can submit a proper fix if you want. PLease reopen and test before commit.

lvlte’s picture

janusman credited becassin.

janusman’s picture

Status: Closed (fixed) » Needs work

Reverted this change because of discussion here and in #2954804