title: Database vs Solr vs Graph DB(Neo4j)
body: <p>I'm thinking about possible solution (tool) for my issue.
  There is a collection of locations with a huge amount (more than 600 000) of elements. Locations have name (in different languages) and represented in tree structure: region->country->admin division->city->zip. User can add custom location, but I plan that these actions will happen rarely. Application should provide efficient ability to perform search by location name, type, to build hierarchical name (f.e. "London->England->United Kingdom"), build subtree of locations (f.e. all countries and cities in those countries of Europe).</p>
  
  <p>I've considered three solutions.</p>
  
  <ol>
  <li><p><strong>Plain database</strong>: locations will hold in some tables and the main building logic will be implemented in java code. In case of this solution I am worried about performance, because search, building tree and creating custom locations can involve additional table joining.</p></li>
  <li><p><strong>SOLR</strong>: at first glance this task is exactly for solr: data set changes rarely, we need search by names. But I'm worried if Solr pivots feature will satisfy the tree building needs. Also I'm not sure if Solr searching will be much better then plain DB, because search is not so difficult (just searching by names which are short strings).</p></li>
  <li><p><strong>graph db Neo4j</strong>: it seems useful for building trees and subtrees. But I'm not sure about search performance (it seems I should use community edition, which does not have some useful performance features like caching and etc.)</p></li>
  </ol>