title: Best way to implement complex search with document based datastoresn
body: <p>This isn't a question directly related to the code itself, but more towards the best way to implement something.</p>
  
  <p>My app is built with JavaScript, specifically done using React, and allows a user to have multiple products, which each product having multiple sub-items.   For example, the user might create a product which they have called "Handmade Wooden Engraved Dog Bowl", and then have sub-items for each website they have their product listed on.  The dataset would look something like this:</p>
  
  <pre><code>{ 
    "name": "Handmade Wooden Engraved Dog Bowl",
    "tags": ["wooden", "handmade", "engraved", "pet", "dog", "bowl"],
    "item": {
      id1: {
        "name": "Handmade Dog Bowl",
        "website": "amazon",
        "active": true,
        },
      id2: {
        "name": "Handmade Wooden Dog Bowl",
        "website": "etsy",
        "active": false,
        }
    }
  }
  </code></pre>
  
  <p>I have a requirement for being able to search the name of the product, the product tabs, but then also the data within each item.</p>
  
  <p>For example, show all products where the tag contains <code>engraved dog bowl</code>, where tags contain <code>handmade</code> and where <code>etsy = false</code></p>
  
  <p>It might be possible to do this client-side with Firestore, but it will require numerous calls, and also data processing will be dependant on the users' computer.</p>
  
  <p>The issue here is each user has about 2,000 products on average, and we could be looking at 2,000 users and up which rules out something such as Algolia due to extremely high costs.</p>
  
  <p>Does anyone have any suggestions around how I could tackle this search issue I have without it costing the earth?</p>