I'm learning Drupal, and having a lot of fun. I am approaching the phase were I'd like to make my content more accessible to users.

I haven't implemented it yet, but I am really liking the ApacheSolr Search Integration module. I was wondering if there was any module to search within Views. My problem is that most of my site is based on Views; I have a lot of content on external databases, which I am maintaining, and Views queries that content for the users.

If Solr doesn't have anything I need, is there any other solution?


You have external data which you are exposing with views.

So you have a couple of options, one would be to get something to index your whole site but as this question shows that is not straightforward.

The second option is to get solr to index your external data. The inbuilt solr module (and solr views) are very node centric. If you have your data in nodes this works fairly simply. If you are only showing external data with views then this solution won't work for you.

So what you can do is to use a solr data import handler to index your data (that is outside the scope of DA but have a look here for some info)

If you get this working you still then have a way to go. Firstly you need to get drupal to talk to solr for non node terms. The solr module will happily talk to any solr server if you are happy to code things yourself, but for views integration you have a bit more work. There are a couple of projects looking to do this, but they are not really mature projects just yet.

Once you have views pointing to solr and searching working you can then format your search results so that they link to your other views.

So for example if you have an external entity with an id XZY you may have a view which takes a url argument at '/myview/XZY' you can edit your search results view so that it points to that url. I have done this here, most of the site is generated using views and solr.

However I think for most of this to work you will have to use views3.


Please see the Apache Solr Views module for combining Solr and Views together.

If you are looking for a Views-only approach, you should watch this screencast on Exposed Filters.

  • wow thanks for the super quick reply. I saw the views module but it said I need views-3, I'm using views-2 with drupal6..would upgrading to views3 from views2 cause any issues? – Lostsoul May 12 '11 at 14:36
  • The upgrade path from Views 2 to Views 3 is relatively stable. However, it is unidirectional; you cannot downgrade later. Test it out locally, after a full backup, and you should be fine. – tim.plunkett May 12 '11 at 16:45

If you are still having issues, you can check out the IndexTank module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.