俗人之家--专注于java相关技术

岂能尽如人意,但求无愧我心!

无名ID:chg2008
15199次访问,排名7498(1)好友0人,关注者3
生命在于运动!
chg2008的文章
原创 13 篇
翻译 0 篇
转载 4 篇
评论 6 篇
最近评论
eitrade:谢谢..
3wdotec:收藏了...
环保袋:不错...
大刘:解决了
大刘:请教那个运行参数是怎么输进去的。
文章分类
收藏
    相册
    生活点滴
    存档
    订阅我的博客
    XML聚合  FeedSky
    订阅到鲜果
    订阅到Google
    订阅到抓虾
    订阅到BlogLines
    订阅到Yahoo
    订阅到GouGou
    订阅到飞鸽
    订阅到Rojo
    订阅到newsgator
    订阅到netvibes

    原创 Lucene入门之--运行Lucene-demo收藏

    新一篇: java产生随机数的两种途径 | 

    运行环境:
    •  JDK 1.5
    •    TOMCAT 5.5
    •    Eclipse 3.0.1
    1. 解压lucene1.4.3
    2. 把luceneweb.war复制到tomcat的webapps目录,重新启动tomcat,就可以看到目录下多了一个luceneweb目录
    3. 新建一个index文件夹,位置不限,用来存放生成的索引文件。这里在D:\Tomcat5.5\webapps\luceneweb\index
    4. 在Eclipse下建立个工程,取名LuceneTest,并添加所需的jar包。Lucene-1.4.3.jar,lucene-demos-1.4.3.jar
    5. 把\lucene-1.4.3\src\demo\org\apache\lucene\demo目录下的类加到工程中,包结构可自定
    6. 运行IndexHtml.java 运行参数-create -index D:\Tomcat5.5\webapps\luceneweb\index D:\Tomcat5.5\webapps\luceneweb\docs 这个根据实际情况调整
    7. 一切没问题后,运行结果如下: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
    8. 修改/luceneweb/下的configuration.jsp文件,String indexLocation = "/opt/lucene/index";改为String indexLocation = "D:\\Tomcat5.5\\webapps\\luceneweb\\index";
    9. 重新启动tomcat,在浏览器中输入http://localhost:8080/luceneweb/,输入lucene查询一下
    10. 可以看到结果:

    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

    。。。。。。。。。。。

    发表于 @ 2006年04月03日 13:37:00|评论(loading...)|编辑

    新一篇: java产生随机数的两种途径 | 

    评论

    #大刘 发表于2007-11-19 21:40:45  IP: 222.66.117.*
    第6部是怎么实现的呢,我用的是Eclipse + Myeclipse, 然后就在第6部运行了run as java application, 不行啊
    #大刘 发表于2007-11-19 21:42:48  IP: 222.66.117.*
    请教那个运行参数是怎么输进去的。
    #大刘 发表于2007-11-19 21:56:03  IP: 222.66.117.*
    解决了
    #环保袋 发表于2008-06-13 16:37:39  IP: 125.114.119.*
    不错...
    #3wdotec 发表于2008-06-13 16:38:03  IP: 125.114.119.*
    收藏了...
    #eitrade 发表于2008-06-13 16:38:24  IP: 125.114.119.*
    谢谢..
    发表评论  


    登录
    Csdn Blog version 3.1a
    Copyright ©