Lucene入门之--运行Lucene-demo
2006-05-10 11:08
399 查看
运行环境:
JDK 1.5
TOMCAT 5.5
Eclipse 3.0.1
解压lucene1.4.3
把luceneweb.war复制到tomcat的webapps目录,重新启动tomcat,就可以看到目录下多了一个luceneweb目录
新建一个index文件夹,位置不限,用来存放生成的索引文件。这里在D:/Tomcat5.5/webapps/luceneweb/index
在Eclipse下建立个工程,取名LuceneTest,并添加所需的jar包。Lucene-1.4.3.jar,lucene-demos-1.4.3.jar
把/lucene-1.4.3/src/demo/org/apache/lucene/demo目录下的类加到工程中,包结构可自定
运行IndexHtml.java 运行参数-create -index D:/Tomcat5.5/webapps/luceneweb/index D:/Tomcat5.5/webapps/luceneweb/docs 这个根据实际情况调整
一切没问题后,运行结果如下:adding D:/Tomcat5.5/webapps/luceneweb/docs/api/packages.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/api/serialized-form.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/benchmarks.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/contributions.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/demo.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/demo2.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/index.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/lucene-sandbox/index.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/lucene-sandbox/larm/overview.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/luceneplan.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/queryparsersyntax.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/resources.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/systemproperties.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/whoweare.html
Optimizing index...
16644 total milliseconds
修改/luceneweb/下的configuration.jsp文件,String indexLocation = "/opt/lucene/index";改为String indexLocation = "D://Tomcat5.5//webapps//luceneweb//index";
重新启动tomcat,在浏览器中输入http://localhost:8080/luceneweb/,输入lucene查询一下
可以看到结果:
Welcome to the Lucene Template application. (This is the header)
JDK 1.5
TOMCAT 5.5
Eclipse 3.0.1
解压lucene1.4.3
把luceneweb.war复制到tomcat的webapps目录,重新启动tomcat,就可以看到目录下多了一个luceneweb目录
新建一个index文件夹,位置不限,用来存放生成的索引文件。这里在D:/Tomcat5.5/webapps/luceneweb/index
在Eclipse下建立个工程,取名LuceneTest,并添加所需的jar包。Lucene-1.4.3.jar,lucene-demos-1.4.3.jar
把/lucene-1.4.3/src/demo/org/apache/lucene/demo目录下的类加到工程中,包结构可自定
运行IndexHtml.java 运行参数-create -index D:/Tomcat5.5/webapps/luceneweb/index D:/Tomcat5.5/webapps/luceneweb/docs 这个根据实际情况调整
一切没问题后,运行结果如下:adding D:/Tomcat5.5/webapps/luceneweb/docs/api/packages.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/api/serialized-form.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/benchmarks.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/contributions.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/demo.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/demo2.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/index.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/lucene-sandbox/index.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/lucene-sandbox/larm/overview.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/luceneplan.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/queryparsersyntax.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/resources.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/systemproperties.html
adding D:/Tomcat5.5/webapps/luceneweb/docs/whoweare.html
Optimizing index...
16644 total milliseconds
修改/luceneweb/下的configuration.jsp文件,String indexLocation = "/opt/lucene/index";改为String indexLocation = "D://Tomcat5.5//webapps//luceneweb//index";
重新启动tomcat,在浏览器中输入http://localhost:8080/luceneweb/,输入lucene查询一下
可以看到结果:
Welcome to the Lucene Template application. (This is the header)
Document | Summary |
Jakarta Lucene - Resources - Jakarta Lucene | [Jakarta Lucene] About Overview Powered by Lucene Who We Are Mailing Lists Resources Wiki FAQ (Official) jGuru FAQ Getting Started Query Syntax System Properties File Formats Javadoc Contributions A |
org.apache.lucene.analysis.de (Lucene 1.4.3 API) | org.apache.lucene.analysis.de Classes GermanAnalyzer GermanStemFilter GermanStemmer WordlistLoader |
org.apache.lucene.document (Lucene 1.4.3 API) | org.apache.lucene.document Classes DateField Document Field 。。。。。。。。。。。 |
相关文章推荐
- Lucene入门之--运行Lucene-demo
- Lucene入门之--运行Lucene-demo
- Caffe入门(一) 运行各种Demo
- lucene入门DEMO2
- Sencha Touch 2 入门 Demo 之一:搭建 Sencha Touch 2 的运行环境
- 全文检索技术Lucene入门和学习、与数据库数据结合的demo实现
- lucene demo 入门配置
- Lucene学习一:入门级Demo,创建索引和查询高亮显示
- lucene入门demo
- LeadTools Android 入门教学——运行第一个Android Demo
- lucene简单入门demo
- Sencha Touch 2 入门 Demo 之一:搭建 Sencha Touch 2 的运行环境
- 配置运行Spring 入门级Demo 和常见故障解决 (Spring in Action)
- Lucene 6.1.0 入门Demo
- lucene简单入门demo
- 转载:Sencha Touch 2 入门 Demo 之一:搭建 Sencha Touch 2 的运行环境
- lucene-3.0.2 demo 入门
- lucene 5可以运行的demo
- lucene第一步--简单的入门demo
- lucene demo 入门配置