I want to set up CiviCrm so that I can use Apache Solr to do a full search. Which CiviCRM tables should I import into Apache Solr?

Is importing tables the correct approach?

I am not a developer so this will be a significant challenge to me.

I am using drupal 7.

  • Bill, care to flesh out what parts of Civi you want searched by Solr?
    – petednz - fuzion
    Aug 23, 2015 at 20:15
  • What is not clear in your answer is why you want to integrate Apache SOLR. You came up with a solution which is Apache SOLR but do not state the problem. As Andrew states below CiviCRM has a very powerful search functionality and usually users are searching for specifics. Aug 25, 2015 at 7:06

2 Answers 2


Considering that you foresee this as a significant challenge for you, I'd like to suggest that it may not be worth the trouble. CiviCRM is unlike within content management systems, where searches are for snippets from among a handful of long text fields. Instead, there are hundreds of fields to search, but you're usually looking for the exact or nearly-exact value.

Consequently, the advanced full-text indexing that Solr would provide would be wasted in most CiviCRM searches. You'd also need to index all the tables (including ones that don't exist yet, as custom data tables are created on the fly and they're among the most-frequently searched). Even the most simple searches by city or email address can involve a bunch of database joins.

In sum, I'm not sure Solr search would be worth it even if you had a bunch of solid developers and an open checkbook. (The only reasonable example I can think of offhand is if you give out a bunch of grants and need a way to search among a ton of proposals.) If you aren't confident in your abilities, you won't want to embark on something this expansive and experimental.


Just to second Andrews comments. We've done some previous work at Compucorp with CiviCRM + Elastic Search (which is similar to SOLR in some respects) and it involves a significant amount of work to create SQL functions to index the data and then produce the search interface.

It may be worth knowing more about your reasons for wanting to use SOLR (Scalability? Full text searching? Read ahead? Data dashboarding?) in order to determine what may be the best approach.

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.