Today, test the Solr and Tomcat6 search engine.
Now list the install and test case.
1.Download apache Solr(v1.2) And Tomcat6 from http://www.apache.org
2.Install Tomcat6 in C:/work/Tomcat/
3.unzip apache solr to a directory, and copy the <apache-solr>/example/solr to C:/work/
4.and copy the war file from <apache-solr>/dist,rename to solr.war to C:/work/Tomcat/webapps/
5.Configure JNDI for tomcat to reference to solr/home.
Create catalina/localhost folder at C:/work/Tomcat/conf, and create solr.xml in C:/work/Tomcat/conf/catalina/localhost/, xml file content is below:
<Context docBase="c:/work/Tomcat/webapps/solr.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="c:/work/solr" override="true" />
</Context>
6.now can run the http://localhost:8080/solr to test the configuration correct or not.
7.modify the schema.xml ,please see the attached.
7. Create a test.xml at C:/work/solr/exampledoc and fill with below data in it
<add><doc>
<field name="trackid">asid87f89asd7f9a</field>
<field name="planet">Cybertron</field>
<field name="icode">cbtron000</field>
<field name="street">1 Optimus Prime Way</field>
<field name="city">Prime City</field>
<field name="country">Optimus</field>
<field name="pcode">fd32as90</field>
<field name="digits">+55555555 555.555.5555</field>
<field name="weight">1000 lbs</field>
<field name="dim">5x20x100</field>
<field name="clocation">enroute to destination planet from earth</field>
</doc>
<doc>
<field name="trackid">asid87f89asd7f9b</field>
<field name="planet">Cybertronb</field>
<field name="icode">cbtron0001</field>
<field name="street">1 Optimus Prime Wayb</field>
<field name="city">Prime Cityb</field>
<field name="country">Optimusb</field>
<field name="pcode">fd32as902</field>
<field name="digits">+55555555 555.555.5556</field>
<field name="weight">1100 lbs</field>
<field name="dim">5x20x101</field>
<field name="clocation">enroute to destination planet from mar</field>
</doc>
</add>
8. Startup tomcat, and use the CMD to submit the index at c:/work/solr/exampledoc/
java -Durl=http://localhost:8080/solr/update -jar post.jar test.xml
9. Then use http://localhost:8080/solr to query the asid87f89asd7f9a in Solr/Lucene Statement
and will response the result.
分享到:
相关推荐
The following is a sample use of highlighting on a search for Corgan in the artist MusicBrainz data set. Recall that the mb_artists request handler is configured to match against the artist name, ...
solr4.10.2与tomcat6的整合
Title: Apache Solr Search Patterns Author: Jayant Kumar Length: 250 pages Edition: 1 Language: English Publisher: Packt Publishing Publication Date: 2015-03-31 ISBN-10: 1783981849 ISBN-13: ...
Apache Solr Search
Apache Solr 3 Enterprise Search Server 部分中文翻译 从博客上面保存下来的。是网页版,方便大家查看
Apache Solr 4 Cookbook Apache Solr 4 Cookbook Apache Solr 4 Cookbook Apache Solr 4 Cookbook Apache Solr 4 Cookbook
Spring Data for Apache Solr API。 Spring Data for Apache Solr 开发文档
Apache Solr Essentials is a fast-paced guide to help you quickly learn the process of creating a scalable, efficient, and powerful search application. The book starts off by explaining the ...
该文档详细讲解了solr如何整合到tomcat中,并且还有附有图片说明
Apache Solr for Indexing Data
solr+ tomcat 项目整合!
Apache Solr: A Practical Approach to Enterprise Search teaches you how to build an enterprise search engine using Apache Solr. You’ll soon learn how to index and search your documents; ingest data ...
apache solr搜索系统的.Net实现
Apache Solr is one of the most popular open source search servers available on the web. However, simply setting up Apache Solr is not enough to ensure the success of your web product. To maximize ...
You are an expert in search engine optimization and query optimization, specializing in Solr. You have helped many people before me to add and query documents from an index for searching. Your task ...
Apache Solr Enterprise Search Server Third Edition.pdf Apache Solr Enterprise Search Server Third Edition.pdf Apache Solr Enterprise Search Server Third Edition.pdf