Top 10 Performance Tips for Apache SOLR

Apache SolrThere are many factors to bring up best implementation of Enterprise Search in Search world.  However few elements are taken into consideration while preparing Solr solrconfig.xml & schema.xml for Core.  Why I’m calling below points as top 10 performance tips? As I said many factor drives the performance, however below points are must to have during a installation; that’s why :)

Below listed tips contribute towards good to start configuration and better performance on Apache SOLR [Enterprise Search] for your search implementation

  1. Master {for Indexing more information} and Slave {for querying more information i.e., application interaction. Multiple slave instances based on need} installation on Apache SOLR
  2. Focus on Solr schema field definition
    • define stored=”false” for all fields possible (particularly large fields) when you required to do a search on the field and not to return the original value
    • On the other hand set indexed=”false” if required to return the field as search result on other indexed fields and not required to do a search on the field.
  3. Use copyField on need basis
  4. Use dynamicField when required
  5. For best index size and searching performance, set “index” to false for all general text fields, use copyField to copy them to one “text” field, and use that for searching
  6. Use StreamingUpdateSolrServer java client to maximize indexing performance ratio
  7. Run SOLR server JVM in “server” mode. For e.g.: provide “-server” in JVM option
  8. Use tint, tlong, tdate, tdouble, tfloat for faster range queries
  9. Use High Level Logging instead of every request on SOLR server side
  10. Disable “autoCommit” on solrconfig.xml

Above key factors will contribute towards betterment of your Solr search configuration.  I will try add other factor for facets, auto suggests, spellcheck dictionary, etc.