Reputation: 1013
I know that Solr and ElasticSearch are wrappers over Lucene. Can you please give me some usecases where we would not prefer to use Solr or ElasticSearch, but would want to use Lucene?
Upvotes: 0
Views: 232
Reputation: 5005
Lucene is a search library built in Java while Solr and Elastic Search (ES) are web applications using Lucene under the hood. In most cases you would prefer Solr or ES to Lucene mainly because of the out of the box mechanisms for: distributed search, replication, sharding and indexing management on multiple nodes. As such mechanisms are hard to implement and maintain using your custom Java app and Lucene.
You would choose Lucene:
To have more control as it's only a jar that doesn't have strict dependencies;
you don't want to be constrained by any particular server;
you don't want to build the automation to deploy Solr or ES in production (with their server, security, eventually zookeeper etc...);
your index won't spawn on multiple nodes;
you're not concerned with development time (as Solr and ES would have many out of the box features compared to Lucene).
So in summary, if you want to have more control on your solution, you would use Lucene.
Upvotes: 1