This patch adds a field handler and a filter hanlder for CCK nodereference fields. I have tested it and it works for me. Please test and improve upon the patch, if possible.

Comments

Remon’s picture

Version: » 6.x-1.x-dev

works for me, thanks :)

david lesieur’s picture

The filter also works for me. Now longing for an argument handler. :)

david lesieur’s picture

I haven't really studied the code, but re-rolled the patch with a few very minor coding style fixes.

Flying Drupalist’s picture

Subscribe

Maikel’s picture

subscribe

psibrtyger’s picture

subscribe

Aldus’s picture

subscribe.

njbooher’s picture

njbooher’s picture

Subscribe

njbooher’s picture

Attached is the patch from comment #3 updated to work with the release from 2010-May-19.

Also attached is the above patch with the addition of an argument handler. To get facet blocks working, the field must be added to part_of_facet_block() in apachesolr_views_query.inc. See #592594: CCK arguments not integrating properly with facet blocks

Remon’s picture

Status: Needs review » Reviewed & tested by the community

works like charm.

Remon’s picture

anybody else could test this patch?

ptrl’s picture

Can't get this to work in lastest dev, Am I missing something? I have a node reference field that shows up in a apache solr block but nothing happens when i click on a node reference and I get no new fields to add under arguments.

kenorb’s picture

Status: Reviewed & tested by the community » Needs work

Handler depends on content_handler_filter_many_to_one, which is part of CCK (where Apache SOLR Views doesn't have this dependency), either we need to add dependency, or write in this way, that it will not throw an error.

attiks’s picture

Status: Needs work » Needs review
StatusFileSize
new27.25 KB

I needed userreference as well, so I used the patch here as a starting point and added userreference support as well as facet support, the exposed filters only show the values that make sense.

I also fixed an error so it works now with the latest dev version

attiks’s picture

StatusFileSize
new27.47 KB

updated patch, so selected options are always shown

mkennedy2d’s picture

Do you plan to add an argument handler?

attiks’s picture

#17, not for the moment, because not much time and i don't need it right now

Flying Drupalist’s picture

+1 for argument filter.

les lim’s picture

Status: Needs review » Needs work

I believe this still has to be adjusted for #14.

p.brouwers’s picture

StatusFileSize
new3.95 KB

I used the patch by attiks and added support for CCK nodereference fields in the D7 version of apachesolr_views and fixed some api-changes in the D7 version of apachesolr too.
Maybe it should be in another issue with the correct version tag?

Anyhow, if anyone needs it you can find it here.

muschpusch’s picture

I tried to apply the patch of #10 to the current dev of Apache Solr Views but i fail... I had a look at the old version when the patch was made and moved some code around but the node reference fields don't appear in views! Could someone provide a new patch?

fourmi4x’s picture

Suscribing, it would be awesome to have a new patch to pass nodereferences as arguments!

divThis’s picture

Rather than patch the existing module, I have created a new module, which is currently available via my sandbox at http://drupal.org/sandbox/divThis/1180710. This utilizes the patch in #10, with some additional tweaks, allowing for use of a nodereference field, filter and argument.

3oheme’s picture

I've just tested divThis sandbox module and it worked like a charm.

Drupal - 6.22
Apache Solr framework - 6.x-1.2
Apache Solr Node Reference - 6.x-1.0

Just a note: you must enable it in admin/settings/apachesolr/enabled-filters -> Apache Solr search fieldset.

If you try to use admin/settings/apachesolr/enabled-filters -> Apache Solr Node Reference fieldset it will not work.

Thank you very much!

rjbrown99’s picture

Sandbox is gone. Does anyone have the code that was previously there, preferably as a patch?

rjbrown99’s picture

StatusFileSize
new31.81 KB

Never mind, here is the patch from #16 with argument support for nodereference. I did not add it for userreference since I don't really need that for my own stuff at the moment.

kenorb’s picture

Priority: Normal » Minor
Issue summary: View changes