If you use an entity reference, a node reference or an user reference as field and set the cardinality to 1, apachesolr detects that correctly and and creates a "ss_field".

But if you use field tarnslation / entity translation to translate these references the callbacks apachesolr_nodereference_indexing_callback(), apachesolr_userreference_indexing_callback() and apachesolr_entityreference_indexing_callback() return all translations as single references.
So the final document that gets sent to solr contains multiple values in a single value field.

The entity / node will never be indexed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkalkbrenner’s picture

Status: Active » Needs review
FileSize
3.02 KB

The solution is that apachesolr must only deal with language neutral references. Everything else must be ignored like everywhere else in apachesolr, which is not aware of node translation or entity translation at all.

I created a patch to solve the issue in that way.

Apache Solr Multilingual will than deal with the multilingual references.

mkalkbrenner’s picture

An improved version of the patch that is more efficient.

mkalkbrenner’s picture

It's too late in the evening. Now the patch returns the references.

Nick_vh’s picture

I like this, simplifies the logic a bit

mkalkbrenner’s picture

I like this, simplifies the logic a bit

... and the current implementation is simply wrong ;-)

In general I think that it's a good approach to only handle the default language and language undefined stuff in apachesolr and leave all multilingual stuff for apachesolr_multilingual.

Nick_vh’s picture

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

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 7.x-1.x

pwolanin’s picture

Version: 6.x-3.x-dev » 7.x-1.x-dev
Status: Patch (to be ported) » Needs review
FileSize
1.63 KB

I think we should add some code comments there

pwolanin’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

committed

mkalkbrenner’s picture

Issue summary: View changes
Status: Patch (to be ported) » Fixed

I think this issue is not relevant for 6.x-3.x

Status: Fixed » Closed (fixed)

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