你好,游客 登录 注册 搜索
背景:
阅读新闻

Project 2-1: 配置Lucene, 建立WEB查询系统[Ubuntu 10.10]

[日期:2010-11-27] 来源:Linux社区  作者:wbia2010 [字体: ]

本文介绍建立web界面的查询系统.

环境:
Ubuntu 10.10
Tomcat 6.x

1. 首先修改build.xml文件, 修改前后的diff:

xxx@ubuntu:~/workspace/lucene$ diff build.xml build.old.xml
45,50d44
<     <path id="wbia.classpath">
<         <path refid="classpath" />
<         <pathelement location="${build.dir}/classes/wbia" />
<         <pathelement location="lib/IKAnalyzer3.2.5Stable.jar" />
<     </path>
<
148,159d141
<     <target name="jar-wbia" depends="compile-wbia">
<         <sequential>
<             <build-manifest title="Lucene Search Engine: demos" />
<             <jar destfile="${build.dir}/${demo.name}.jar" basedir="${build.dir}/classes/wbia" excludes="**/*.java" manifest="${manifest.file}">
<                 <metainf dir="${common.dir}">
<                     <include name="LICENSE.txt" />
<                     <include name="NOTICE.txt" />
<                 </metainf>
<             </jar>
<         </sequential>
<     </target>
<
187,201d168
<     <target name="war-wbia" depends="jar-core,jar-wbia">
<         <sequential>
<             <build-manifest title="Lucene Search Engine: demos" />
<             <war destfile="${build.dir}/${demo.war.name}.war" webxml="src/jsp/WEB-INF/web.xml" manifest="${manifest.file}">
<                 <fileset dir="src/jsp.wbia" excludes="WEB-INF/web.xml" />
<                 <lib dir="${build.dir}" includes="${final.name}.jar" />
<                 <lib dir="lib" includes="IKAnalyzer3.2.5Stable.jar" />
<                 <metainf dir="${common.dir}">
<                     <include name="LICENSE.txt" />
<                     <include name="NOTICE.txt" />
<                 </metainf>
<             </war>
<         </sequential>
<     </target>
<
213,220d179
<         </compile>
<     </target>
<
<     <target name="compile-wbia" depends="compile-core">
<         <mkdir dir="${build.dir}/classes/wbia" />
<
<         <compile srcdir="contrib/wbia" destdir="${build.dir}/classes/wbia">
<             <classpath refid="wbia.classpath" />

2. 再将src/jsp复制一份命名为src/jsp.wbia, 修改src/jsp.wbia/results.jsp, 【Linux公社 www.linuxidc.com 】主要是添加页面编码, IKQueryParser和搜索结果总数.

linux
相关资讯       Ubuntu 10.10  Project 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款