Answers.Body: <p>Currently not possible, but I really like the idea of a plugin being able to swap out what <code>craft()-&gt;search</code> points to, whether it's <a href="https://www.elastic.co/products/elasticsearch" rel="nofollow">ElasticSearch</a>, <a href="https://lucene.apache.org/" rel="nofollow">Lucene</a>, etc.</p>
  
  <p>I'll add it to our internal list, but you might want to submit a public <a href="http://feedback.buildwithcraft.com/" rel="nofollow">feature request</a> for this as well.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-01T22:02:41.633Z
Answers.Text: Feature request submitted! I suspected that might be the case, but thanks for the concrete answer!
Answers.UserDisplayName: ninjascript
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-01T21:38:57.560Z
Answers.LastActivityDate: 2015-04-01T21:38:57.560Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm relatively new to CraftCMS, so feel free to smack me upside the head if I'm missing something obvious.</p>
  
  <p>We have an ElasticSearch provider that I'd like to use instead of Craft's default search.</p>
  
  <p>The file at <code>/app/etc/config/common.php</code> appears to be a dependency injection system that should make replacing core components relatively easy, and 
  the class defined in <code>/app/services/SearchService.php</code> looks simple enough to replace with a custom solution.</p>
  
  <p>Unfortunately I'm having trouble finding documentation around replacing core components, and I'm not having much luck finding any way to override the common config file from outside the core application.</p>
  
  <p>It might be that I'm going about this the wrong way, and I'm totally open to suggestions. Either way, thanks in advance!</p>
  
Tags: <config><custom>
Title: Replacing core services
ThreadText: # Replacing core services
  
  (Asked by: username_0 on 2015-04-01)
  
  I'm relatively new to CraftCMS, so feel free to smack me upside the head if I'm missing something obvious.
  
  We have an ElasticSearch provider that I'd like to use instead of Craft's default search.
  
  The file at `/app/etc/config/common.php` appears to be a dependency injection system that should make replacing core components relatively easy, and
  the class defined in `/app/services/SearchService.php` looks simple enough to replace with a custom solution.
  
  Unfortunately I'm having trouble finding documentation around replacing core components, and I'm not having much luck finding any way to override the common config file from outside the core application.
  
  It might be that I'm going about this the wrong way, and I'm totally open to suggestions. Either way, thanks in advance!
  
  **Tags:** config, custom
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-01. Score: 2 | Accepted answer
  
  Currently not possible, but I really like the idea of a plugin being able to swap out what `craft()->search` points to, whether it's [ElasticSearch](https://www.elastic.co/products/elasticsearch), [Lucene](https://lucene.apache.org/), etc.
  
  I'll add it to our internal list, but you might want to submit a public [feature request](http://feedback.buildwithcraft.com/) for this as well.
  
  > **Comments:**
  > **username_0**: Feature request submitted! I suspected that might be the case, but thanks for the concrete answer!  
  
  ---
  
  