How are SOLR and Lucene related?
For example ZF is a bunch of code that 开发者_StackOverflow中文版is written in PHP and runs on Apache (assuming web server...)
SOLR is something that runs on Lucene? that is written in Java and runs on some servlet container.
What is that "something"? What is SOLR to Lucene? What function does Lucene by itself gives me?Lucene is a Java library packaged as a JAR that perform the operations of information indexing and retrieval. SOLR is a standalone full text search application that provides features like hit highlighting, and faceted search while using the underlying Lucene library as part of its internal api.
Lucene by itself give you the means through a Java API to index documents independent of file format and retrieve them, but it doesn't provide alot of the supporting functionality that a full featured web based search application requires, SOLR helps fill this gap. Indexing and searching in SOLR is typically done through GET and POST making it easier to use as a piece of infrastructure for web apps regardless of what language they're written in.
Lucene is a Java-based search engine. It runs in a JVM; it does not need a web container. It creates an index for documents as directed by a developer and uses it to perform indexed searches.
SOLR is a web app, deployed in a servlet container, that provides a web front end for doing Lucene indexed searches of collections of documents.
Lucene is not a search engine on its own. It's a library to create one.
To use analogy, Lucene relates to Solr in the same way as an engine to a car. You can build different vehicles with combustion engine, but the engine on its own won't get you far.
精彩评论