Hi,

Cause i cannot use view arguments as issue here for other user: Apache Solr View Argument Handlers Missing D7, and i cannot made it work as the D6 version, i made another solution that could be great to include in the module.

My solution is to include a hook as solr module do, to alter the query prior it is sended to the solr server. I send a patch with my solution.

Best
David

Comments

nyleve101’s picture

Hi,

does this work with the current development release?

Hope you're well,

Evelyn

ygerasimov’s picture

Category: feature » support
Status: Active » Fixed

I think this is no more needed as we execute query via apachesolr_do_query() so you can alter query with hook_apachesolr_query_alter() hook.

Also some of the handlers have been ported now.

Marking this issue as fixed.

david.gil’s picture

Status: Fixed » Active
StatusFileSize
new1.3 KB

Hi Yuriy,

i reopen this, and send a patch to the latest dev realese, but this time using hook_views_query_alter, as views do.

In the implementation of apachesolr_views in apachesolr_views_query we extend views_plugin_query that has an empty alter method implementation, but there is an implementation in views_plugin_query_default.

As you said we can hook the apache solr query, but there we have not any information about the views query being executed and i have a couple of use cases where that is needed to modify the query send to solr.

I send a patch.

Best
David

ygerasimov’s picture

Status: Active » Fixed

Thank you for the patch. Now I understand the idea. Committed.

Please next time make sure your patch can be applied on module's repo. See http://drupal.org/node/707484

Status: Fixed » Closed (fixed)

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