while working on geocluster integration with search_api, i was looking for a way to access the views object from a custom SearchApiSolrService implementation. as the service doesn't know about search_api_views, there seemed no way to pass query options transparently from SearchApiViewsQuery.

CommentFileSizeAuthor
#1 1832586_search_api_views_pre_execute.patch805 bytesdasjo

Comments

dasjo’s picture

Status: Active » Needs review
StatusFileSize
new805 bytes

my solution was to add a hook_search_api_views_pre_execute which allows to access both the view and the query object before execution.

here's a link to an example usage: http://drupalcode.org/project/geocluster.git/blob/549475e310608af45c289a...

of course i'd be happy to know if there where other possibilities to pass that data. one might be subclassing SearchApiViewsQuery but i didn't want to do that for just the three lines of code.

legolasbo’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

This issue has not seen activity in over 2,5 years. I am therefore closing this issue to clean up the issue queue. Feel free to re-open and update this issue if you feel this issue is still relevant and of importance.