Http://tech.funnyai.com/index.php/Solar Solar from the technology encyclopedia Jump to: navigation, search
SOLR is an independent enterprise-class search application server that provides an API interface similar to Web-service. The user can submit a certain format XML file to the Search engine server through HTTP request, generate the index, also can make the search request through the HTTP GET operation, and obtain the return result of the XML format;
SOLR is a high-performance, JAVA5-developed, Full-text Search server based on Lucene. At the same time, it has been extended to provide a richer query language than Lucene, while achieving configurable, scalable and optimized query performance, and provides a complete functional management interface, is a very good full-text search engine.
The document is added to a search collection through HTTP using XML. Querying the collection is also achieved by receiving an Xml/json response via HTTP. Its main features include: efficient, flexible caching, vertical search, highlighting search results, increasing usability through index replication, and providing a powerful data schema to define fields, types and text analysis, and web-based management interfaces.
This article is primarily a simple tutorial using SOLR. For more information, refer to http://lucene.apache.org/solr/tutorial.html or other websites.
1. First download solr1.3.0, address for http://www.apache.org/dyn/closer.cgi/lucene/solr/
2. Unzip the files under download.
3. Under the download of SOLR with a jetty launch version, run Apache-solr-1.3.0\example under the Start.jar can
4. Access to http://localhost:8983/solr/admin/, you can see a management interface, this is a search, the result returned is 0, because there is no index.
5. Now start indexing, SOLR is based on Lucene, so some concepts are the same, such as Field,doc and so on. If you do not understand these concepts, you can look at the Lucene in action book, or the related documentation for Lucene. SOLR's indexed content can be described in XML as a file, with some example under the Exampledoc file, open one casually, roughly as follows:
<add> <doc> <field name= "id" >SOLR1000</field> <field name= "name" >SOLR, the Enterprise Search server</field> <field name= "Manu" >apache Software-foundation</field> <field "Cat" >software</field> <field name= "Cat" >search</field> <field name= "Features" >advanced Full-text Search capabilities using lucene</field> <field name= "features" >optimized for high Volume Web Traff Ic</field> <field name= "Features" >standards Based Open interfaces-xml and http</field> <field name = "Features" >comprehensive HTML administration interfaces</field> <field name= "Features" >scalability- Efficient Replication to other SOLR Search servers</field> <field name= ' features ' >flexible and adaptable with XML configuration and schema</field> <field name= "Features" >good Unicode Support:héllo (hello with an accent Over the E) </field> <field name= "Price" >0</field> <field name= "popularity" >10</field> <field name= "Instock" >true</field> <field Name= "Incubationdate_dt" >2006-01-17T00:00:00.000Z</field> </doc> </add>
If you have used Lucene, it should be easy to understand the meaning of this XML content. You can also write some XML files of a similar format yourself.
6. Submit index Run this directory under the EXAMPLEDIOC directory of the Post.jar, will need to submit the XML file as parameters, such as:
Java-jar Post.jar Solr.xml
So the index will be submitted and built.
7. At this point in the Access http://localhost:8983/solr/admin/, SOLR is entered as a keyword in querystring. Click Search to see the returned search results.
===========
http://download.csdn.net/detail/zxh116116/727276