title: Elasticsearch replication of other system data?
body: <p>Suppose I want to use elasticsearch to implement a generic search on a website.  The top search bar would be expected to find resources of all different kinds across the site.  Documents for sure (uploaded/indexed via tika) but also things like clients, accounts, other people, etc.</p>
  
  <p>For architectural reasons, most of the non-document stuff (clients, accounts) will exist in a relational database.</p>
  
  <p>When implementing this search, option #1 would be to create document versions of everything, and then just use elasticsearch to run all aspects of the search, relying not at all on the relational database for finding different types of objects.</p>
  
  <p>Option #2 would be to use elasticsearch only for indexing the documents, which would mean for a general "site search" feature, you'd have to farm out multiple searches to multiple systems, then aggregate the results before returning them.</p>
  
  <p>Option #1 seems far superior, but the downside is that it requires that elastic search in essence have a copy of a great many things in the production relational database, plus that those copies be kept fresh as things change.</p>
  
  <p>What's the best option for keeping these stores in sync, and am I correct in thinking that for general search, option #1 is superior?   Is there an option #3?</p>