title: Advanced Search algorithm on Google Appengine datastore and indexes
body: <p>I am using appengine with python (version 2.7) for a web application which deals with job listings and job search. 
  Backend consists of a "Job" table which consists of 20+ fields such as title,date,experience etc. I have the necessary composite indexes defined for each of the filter's permutation and combination. As you would have guessed, the number of indexes are high.</p>
  
  <p>The front-end provides option for users to search for jobs and filter them using the columns.</p>
  
  <p>This works as expected but with following drawbacks:</p>
  
  <ul>
  <li>Slow Search Performance</li>
  <li>The search is divided into two parts: inbuilt datastore filtering and then a custom filtering on top of the refined results. The custom filtering is required to further apply the complex filters which are not supported by appengine.</li>
  <li>Exploding composite indexes</li>
  </ul>
  
  <p>Some columns (5 for instance) accepts only a set of values, so filtering using them is pretty straightforward. While other fields can have user defined values and hence filtering through them requires custom python code.</p>
  
  <p>Jinja is the templating engine which then renders the data into the html.</p>
  
  <p>Advanced Search + Index References: <a href="https://cloud.google.com/appengine/articles/indexselection" rel="nofollow noreferrer">https://cloud.google.com/appengine/articles/indexselection</a></p>
  
  <p>Is there a better approach/algorithm for implementing the search and advanced search in the appengine?</p>