Similar to the current integration with the References module, it would be great to integrate with the Entity Reference module as it is gaining popularity. I have a sandbox at http://drupal.org/sandbox/cpliakas/1572718 with working code, so if you are not willing to provide integration in this project I am perfectly content releasing the code as a standalone module. Let me know how you want me to proceed and I can roll a patch as necessary.

Thanks,
Chris

Comments

nick_vh’s picture

That would be certainly welcome! Provide a patch for the module and I don't see why it would not be able to get in :-)

cpliakas’s picture

Sounds good. I will post a patch, and we also have a client who will validate that the solution works as intended.

Thanks,
Chris

eporama’s picture

Status: Active » Needs review
StatusFileSize
new3.03 KB

Here's a first attempt at putting Chris' sandbox code into the apachesolr module files.

Our first attempt at using the sandbox module worked quite well.

cpliakas’s picture

Assigned: cpliakas » Unassigned

Thanks for picking this up, eporama. This looks good to me. I tested it locally, and it works as expected. Not marking as RTBC only because I don't think it is appropriate for me to do so since I wrote the original code.

pwolanin’s picture

@cpliakas - if you've tested it go ahead and commit.

cpliakas’s picture

Status: Needs review » Reviewed & tested by the community

Will do. This has been validated in multiple places, so marking as RTBC and will commit.

wonder95’s picture

Status: Reviewed & tested by the community » Needs review

Being coding standard anal here, these lines in entityreference_apachesolr_field_mappings() need some indentation:

    'entityreference' => array(
    'indexing_callback' => 'apachesolr_entityreference_indexing_callback',
    'map callback' => 'apachesolr_entityreference_facet_map_callback',
    'index_type' => 'string',
    'facets' => TRUE,
    'query types' => array('term'),
    'facet missing allowed' => TRUE,
    ),
cpliakas’s picture

StatusFileSize
new3.04 KB

wonder95,

Good catch! Indentation fixed in the attached patch.

Thanks,
Chris

cpliakas’s picture

Status: Needs review » Fixed

Committed at http://drupalcode.org/project/apachesolr.git/commit/f3deaab5a35dfdf16797....

eporama, congrats on your first credited commit to Apache Solr Search Integration!

nick_vh’s picture

Status: Fixed » Closed (fixed)