title: How to implement facets and item search using Elastic Search and Solr search engine
body: <p>I am working on a web app something like a digital library or archiving system, and before writing a code. I am thinking about the architecture design of this web application.</p>
  
  <p>This system  will have multiple tables like <code>audio</code> <code>video</code> <code>book</code> <code>software</code> and much more</p>
  
  <p>all table will have the common field called <code>title</code> and <code>id</code>, which I am thinking to index in <code>solr</code> or <code>elastic search</code> engine.</p>
  
  <p>Let's say When I query a keyword <code>story</code> from my fronted using a simple search Form Via <code>REST/AJAX</code> to the search engine like <code>solr</code> or <code>elastic search</code>.</p>
  
  <p>How do I access all the data from the <code>postgresql</code> table and total count info that matches the search query in search engine.</p>
  
  <p>The overall architecture I am thinking is shown below.
  <a href="https://i.stack.imgur.com/pTs5K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pTs5K.png" alt="enter image description here"></a></p>
  
  <p>Technology stack I am thinking is 
  Database <code>PostgreSQL</code>
  SearchEngine: <code>Don't know asking for recommendation</code>
  BackEnd REST: <code>Django rest framework or express js</code>
  Fronted: <code>Reactjs</code></p>
  
  <p>So, Summary: How do a multiple table search on PostgreSQL database using <code>solr</code> or <code>elastic search</code> so that I can have a complete result of the item_data match in each table as well as the item_details. </p>