jplogicv1.0开发开发案例之知识库文档信息索引检索(类仿百度搜索、类google搜索)
来源:互联网 发布:java工程师 职业寿命 编辑:程序博客网 时间:2024/05/17 02:19
基于很多项目中都都可能会使用到针对海量文档信息进行实时检索的需要!对于用户而言比较习惯于百度搜索的使用!本文针对海量文档检索的需求进行描述!针对海量的文档数据我们需要做到最起码两点:1、高效索引 2、高效搜索。当然做到这两点我们需要在我们的项目中完成多道工序,根据索引框架的特点,做相应的优化工作,这样基本上可以完成80%以上的需要,那20%的缺陷可能来自于索引框架本身的局限,比如lucene本身的一些缺点,也可能来自你的编码上的设计。闲话少说,如下是本人针对很多项目中将会使用的一些文档检索的开发案例。开发案例是在jplogic上实现,可移植到其他项目中,如下是海量文档检索功能实现(欢迎进入群【376447127】):
相对简洁的页面(不需要美工额外的设计,每个工程师都可以定制漂亮的界面)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-<span style="color:#ff0000;">transitional</span>.dtd"> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%@ taglib uri="/WEB-INF/tagtld/htmlTagComponet.tld" prefix="JB"%><html> <head> <style> html,body {width: 100%;height: 100%;margin: 0px;padding: 0px;overflow: hidden;} </style> <JB:ComponentBase id="bomponentBase" isJudgeSession="true" ></JB:ComponentBase> <title>全文检索列表</title><script> var formOperate = new FormOperateObject(); function okOperate(){ closeBlDialog();} function noOperate(){ closeBlDialog();}//全文检索操作function toolbarall_textOperate(id) { //搜索按钮if (id == 'all_text_Toolbar4') {var value = $.trim(toolbar_all_text_Toolbar.getValue('all_text_Toolbar2'));if (value == '') {OpenBlDialog('提示','搜索关键字不能为空!','WARN','','','okOperate()','noOperate()','','');} else {var url = 'jsp/JpSystem/doc/DocAllTextQueryResultForm.jsp?queryParam=' +value;url = formOperate.changeURLParamValue(url,'queryParam',value);layout_all_text_layout.cells('a').attachURL(url);}}}</script> </head><body id="all_text_body" > <div id="query_result" style="padding:4px;width:99%;height:100%;font-family:'宋体';font-size:50px;overflow:auto;display: none;text-align: center;"> <b>欢迎进入知识库信息检索,输入相应的知识库信息关联的<font color='red'>关键字</font>即可</b> </div> <!-- 布局管理器 --><JB:LayoutComponent layoutPattern="1C" parentId="all_text_body" id="all_text_layout" autoReSize="true" isAttachProgress="true"> <!-- 全文操作 --> <JB:LayoutCellComponent id="abc" layoutCellTitle="全文检索" layoutId="all_text_layout" layoutCellName="a" embeddedToolbarId="all_text_Toolbar" attachObjectId="query_result" hiddenHead="false" layoutCellHeigth="600"><JB:ToolBarComponent id="all_text_Toolbar" layoutCellToolbarId="all_text_Toolbar" onclick="toolbarall_textOperate" title="全文检索操作" gridId=""> <JB:ToolBarCellComponent id="all_text_Toolbar" cellType="text" btnSelectName="<b>关键词搜索</b>" imgDisabled="save_dis.gif" imgEnabled="save.gif" itemId="0" optionItems=""></JB:ToolBarCellComponent> <JB:ToolBarCellComponent id="all_text_Toolbar" cellType="separator" imgDisabled="" imgEnabled="" itemId="1" optionItems=""></JB:ToolBarCellComponent> <JB:ToolBarCellComponent id="all_text_Toolbar" cellType="input" btnSelectName="" inputTextWidth="600" imgDisabled="new_dis.gif" imgEnabled="new.gif" itemId="2" optionItems="" ></JB:ToolBarCellComponent> <JB:ToolBarCellComponent id="all_text_Toolbar" cellType="separator" imgDisabled="" imgEnabled="" itemId="3" optionItems=""></JB:ToolBarCellComponent> <JB:ToolBarCellComponent id="all_text_Toolbar" cellType="button" btnSelectName="<b>开始检索</b>" imgDisabled="new_dis.gif" imgEnabled="new.gif" itemId="4" optionItems=""></JB:ToolBarCellComponent></JB:ToolBarComponent></JB:LayoutCellComponent></JB:LayoutComponent> </body> </html>
系统界面:
海量文档检索首页
知识库资料上传以及追加
检索结果列表
文档预览
文档下载
下载结果
0 0
- jplogicv1.0开发开发案例之知识库文档信息索引检索(类仿百度搜索、类google搜索)
- jplogic v1.0 开发案例--知识库管理(视频资料上传、格式转化、视频截图、视频预览、视频信息索引检索)
- jplogic v1.0案例开发之知识库管理(文档管理等)(二)
- 基于lucene的案例开发:搜索索引
- 百度地图开发之【公交信息检索】
- 百度地图开发之公交信息检索
- AJAX小案例:动态搜索提示(仿百度)
- 创建检索索引的搜索类
- 仿百度和google的搜索提示
- 百度搜索开发
- IOS开发(52)之UITableView索引搜索之UILocalizedIndexedCollation
- 浏览器开发之百度搜索url
- IOS开发(51)之UITableView建立索引搜索
- 仿google、百度搜索框输入信息智能提示的实现 兼容主流浏览器
- 仿google、百度搜索框输入信息智能提示的实现 兼容主流浏览器
- android百度地图开发V4.5最新版(7)---POI搜索之全城搜索
- android百度地图开发V4.5最新版(8)---POI搜索之周边搜索
- Jquery插件之仿百度感应搜索
- [LeetCode49]Maximum Subarray
- [C/C++]指针解析,char * a, char ** a, char * a[], char a[][], char * a[][], char ** a[][], char * a [][][
- NOI2008 Day 1 解题报告
- 第一次黑人,简直爽到不行!!
- 数组简单总
- jplogicv1.0开发开发案例之知识库文档信息索引检索(类仿百度搜索、类google搜索)
- C++Primer学习笔记《2》
- netty学习之Channel接口
- ffmpeg(11) pmt_cb
- NSTimer 用法总结
- Netty Channel 接口名词理解
- Spring PropertyEditor实现绑定时的类型转换
- Springmvc PropertyEditor实现绑定时的类型转换
- OpenCv cv::Mat类用法