I know that Lucene and Solr are 2 differents Apache projects that are made to work together, but I don't understand what is the aim of each project.
For what I understood untill now is that Lucene is used to create a search index and Solr use this index to perform searches.
Am I right or is this a totally different approach?
@darkheir: Lucene and Solr are 2 differents Apache projects that are made to work together, I don't understand what is the aim of each project.
1) Solr uses Lucene under the hood. Lucene has no clue about the Solr API.
2) Lucene is a powerful search engine framework that lets us add search capability to our application. It exposes an easy-to-use API while hiding all the search-related complex operations. Any application can use this library, not just Solr.
3) Solr is built around Lucene. It is not just an http-wrapper around Lucene but has been known to add more arsenal to Lucene. Solr is ready-to-use out of box. It is a web application that offers related infrastructure and a lot more features in addition to what Lucene offers.
@darkheir: Lucene is used to create a search index and Solr use this index to perform searches. Am I right or is this a totally different approach?
4) Lucene doesn't just create the Index for the consumption by Solr. Lucene handles all the search related operations. Any application can use the Lucene framework.
Examples are Solr, Elastic Search, LinkedIn (yes, under the hood), etc..
Check out this article: Lucene vs Solr
When to use Lucene?
When to use Solr?
NOTE: I don't mean that Solr is hard to customize. Solr is very flexible and provides a lot of pluggable API points, allowing you to throw-in your code.
There are people, falling under 'have to use Lucene' camp, but still prefer Solr to plain Lucene as it's easy to use. However, they never restrain themselves from customizing Solr to the maximum extent.
BTW, I see that there are more resources on Solr (4.x) than Lucene (4.x).