- 浏览: 342411 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
longgol:
错误地写日志记录到表[orcl192.168.1.7etl]C ...
Job和Trans记录日志到数据表 -
longgol:
我试过java调用ETL执行可成功, kettle客户端配置日 ...
Job和Trans记录日志到数据表 -
longgol:
哥, 你这代码贴的时间够早了哈。
Job和Trans记录日志到数据表 -
cleaneyes:
flyingdonkey 写道cleaneyes 写道性能还不 ...
CAS稳定性测试异常 -
lsjinpeng:
太多了。。。
建议,插件的功能用红色标记下
收集一些基于jQuery框架开发的控件/jquery插件
/** * 關鍵詞提醒 * @param keyword * @return */ public List remindKeyword(String keyword){ List keywordList = new ArrayList(); IndexReader indexReader; try { File indexDir = new File(INDEX_STORE_PATH); if (indexDir.exists()){ indexReader = IndexReader.open(INDEX_STORE_PATH); //以輸入的文字開頭,搜索contents的關鍵詞 Term sterm = new Term("contents",keyword); TermEnum termEnum = indexReader.terms(sterm); while (true){ Term term = termEnum.term(); if (term == null || (!term.text().startsWith(keyword))){ break; } //關鍵詞出現的位置 TermPositions termPositions = indexReader.termPositions(term); //關鍵詞出現的頻率 int frq = termPositions.freq(); while (termPositions.next()){ frq = frq + termPositions.freq(); } if (frq >0){ Map keyElt = new HashMap(); keyElt.put("KEY", term.text()); keyElt.put("VALUE", String.valueOf(frq)); //System.out.println(term.text()+":"+frq); keywordList.add(keyElt); } termEnum.next(); } // 以輸入的文字開頭,搜索topic的關鍵詞 List keywordList2 = new ArrayList(); sterm = new Term("topic",keyword); termEnum = indexReader.terms(sterm); while (true){ Term term = termEnum.term(); if (term == null || (!term.text().startsWith(keyword))){ break; } //關鍵詞出現的位置 TermPositions termPositions = indexReader.termPositions(term); //關鍵詞出現的頻率 int frq = termPositions.freq(); while (termPositions.next()){ frq = frq + termPositions.freq(); } if (frq > 0){ Map keyElt = new HashMap(); keyElt.put("KEY", term.text()); keyElt.put("VALUE", String.valueOf(frq)); //System.out.println(term.text()+":"+frq); keywordList2.add(keyElt); } termEnum.next(); } //合並相同的關鍵詞 if (keywordList.size() >0 && keywordList2.size()>0){ int i=0; int j=0; Map elt1 = (Map)keywordList.get(0); Map elt2 = (Map)keywordList2.get(0); while (true){ String text1 = (String)elt1.get("KEY"); String text2 = (String)elt2.get("KEY"); int compare = text1.compareTo(text2); if (compare == 0){ int frq = Integer.valueOf((String)elt1.get("VALUE")) + Integer.valueOf((String)elt2.get("VALUE")); elt1.put("VALUE", String.valueOf(frq)); keywordList2.remove(j); if(++j < keywordList2.size() && ++i < keywordList.size()){ elt1 = (Map)keywordList.get(i); elt2 = (Map)keywordList2.get(j); } else{ break; } } else if(compare > 0){ if (++j < keywordList2.size()){ elt2 = (Map)keywordList2.get(j); } else{ break; } } else { if (++i < keywordList.size()){ elt1 = (Map)keywordList.get(i); } else{ break; } } } } keywordList.addAll(keywordList2); indexReader.close(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); throw new LuceneException(); } //依出現次數排序 Comparator<Map> itemComparator = new Comparator<Map>() { public int compare(Map a, Map b) { return Integer.valueOf((String)a.get("VALUE")).intValue() - Integer.valueOf((String)b.get("VALUE")).intValue(); } }; Collections.sort(keywordList, Collections.reverseOrder(itemComparator)); int maxSize = keywordList.size(); if (maxSize > 10) maxSize = 10; keywordList = keywordList.subList(0, maxSize); return keywordList; }
function getAlert(tagetpara,e){ alertObj = tagetpara; alertEvent = e; //alert(tagetpara.name); var keyword = tagetpara.value; if (keyword != ''){ AjaxService.remindKeyword(keyword,refreshKeywordList); return !showPopup(alertObj.name,'USER_ALERT_DIV',event, alertEvent); } } function refreshKeywordList(data){ reply01(data); } function getsearchpara(data,indexnum){ alertObj.value=data[indexnum]['KEY']; hideCurrentPopup(); } var reply01 = function(data){ dwr.util.removeAllRows(useralert); dwr.util.addRows( useralert, data, cellFunctions, { rowCreator:function(options) { var row = document.createElement("tr"); row.className = "table_row_single"; row.onclick=function (){ getsearchpara(data,this.rowIndex); }; row.onmouseover=function (){ onMouseOver(this); }; row.onmouseout=function (){ onMouseOut(this,'table_row_single'); }; return row; }, cellCreator:function(options) { var td = document.createElement("td"); td.className="table_list_column"; return td; } } ); } var cellFunctions = [ function(keyword) { return keyword.KEY; }, function(keyword) { return keyword.VALUE;} ];
<div CLASS="bubble_panel01" id="USER_ALERT_DIV" STYLE="WIDTH:200px" onClick="event.cancelBubble = true;"> <TABLE ID="T1180684588156_TABLE" CLASS="table_bg" STYLE="MARGIN-BOTTOM:16px" STYLE="WIDTH:200px" BORDER="0" CELLPADDING="0" CELLSPACING="0"> <TBODY ID="useralert"> </TBODY> </TABLE> </div>
.bubble_panel01 { BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; VISIBILITY: hidden; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid; WIDTH: 200px; POSITION: absolute; BACKGROUND-COLOR: white; LAYER-BACKGROUND-COLOR: yellow } .table_row_single01{ background-color: #FFFFFF; line-height: 20px; onmouseover: expression(onmouseover=function (){this.style.backgroundColor ='#FFFF99'}); onmouseout: expression(onmouseout=function (){this.style.backgroundColor ='#FFFFFF'}); } .table_list_column01 { font-family: Arial; font-size: 11px; text-decoration: none; padding-left: 4px; padding-right: 4px; line-height: 20px; }
评论
2 楼
cleaneyes
2008-05-28
未进行大数据量的测试.
小的数据量的速度还是很快的.
小的数据量的速度还是很快的.
1 楼
jiqiumin
2008-05-28
不知道效率怎么样??我笨打算用ajax查缓存的但是暂时还没实施呵呵
发表评论
-
Cygwin
2008-07-04 08:51 0虛擬linux -
Lucene讀書筆記(四)
2008-06-12 18:39 1360一些公用的基础类 表 3.2 基础类包org.apache. ... -
Lucene讀書筆記(三)
2008-06-12 18:03 1292Lucene索引文檔格式: ... -
Lucene學習筆記(二)
2008-06-10 16:29 1242Lucene的目的是为软件开发人员提供一个简单易用的工具包,L ... -
Lucene學習筆記(一)
2008-06-10 16:20 1145全文检索是指计算机索引程序通过扫描文章中的每一个词, ... -
Heritrix入門
2008-05-23 11:58 0Heritrix的下載地址:http://sourceforg ... -
Lucene分析器的實現
2008-05-22 16:01 1932public abstract class Analyzer ... -
Lucene實戰開發手記(六)--- 搜索、刪除索引代碼
2008-05-15 15:30 2373無特別之處,了解的朋友不用看。 /** * 限制分類 ... -
Lucene實戰開發手記(五)--- 為html/txt格式的文檔創建索引
2008-05-15 11:57 2666txt與html解析存在亂碼的問題,這個問題困擾了我好幾天,最 ... -
Lucene實戰開發手記(四)--- 為PDF/excel/doc格式的文檔創建索引
2008-05-15 11:39 3171上篇有提到這段代碼: DocHander docHander ... -
Lucene實戰開發手記(三)--- 創建索引細節方法
2008-05-15 11:37 1989/** * 文檔主體建立索引 * 注意文檔與附件 ... -
Lucene實戰開發手記(二)--- 創建索引主方法
2008-05-15 11:07 2183對索引操作的類為KbIndexProcesser 文檔主體類 ... -
Lucene實戰開發手記(一)--- 前言
2008-05-15 10:58 2368《Lucene實戰開發手記》系列文章的適用對象為 ... -
Lucene入門草稿
2008-04-15 14:42 1443索引3種方式:倒排、後 ...
相关推荐
赠送jar包:lucene-analyzers-smartcn-7.7.0.jar; 赠送原API文档:lucene-analyzers-smartcn-7.7.0-javadoc.jar; 赠送源代码:lucene-analyzers-smartcn-7.7.0-sources.jar; 赠送Maven依赖信息文件:lucene-...
赠送jar包:lucene-analyzers-common-6.6.0.jar; 赠送原API文档:lucene-analyzers-common-6.6.0-javadoc.jar; 赠送源代码:lucene-analyzers-common-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-...
赠送jar包:lucene-core-7.7.0.jar; 赠送原API文档:lucene-core-7.7.0-javadoc.jar; 赠送源代码:lucene-core-7.7.0-sources.jar; 赠送Maven依赖信息文件:lucene-core-7.7.0.pom; 包含翻译后的API文档:lucene...
赠送jar包:lucene-backward-codecs-7.3.1.jar; 赠送原API文档:lucene-backward-codecs-7.3.1-javadoc.jar; 赠送源代码:lucene-backward-codecs-7.3.1-sources.jar; 赠送Maven依赖信息文件:lucene-backward-...
赠送jar包:lucene-spatial-extras-7.3.1.jar; 赠送原API文档:lucene-spatial-extras-7.3.1-javadoc.jar; 赠送源代码:lucene-spatial-extras-7.3.1-sources.jar; 赠送Maven依赖信息文件:lucene-spatial-extras...
赠送jar包:lucene-analyzers-smartcn-7.7.0.jar; 赠送原API文档:lucene-analyzers-smartcn-7.7.0-javadoc.jar; 赠送源代码:lucene-analyzers-smartcn-7.7.0-sources.jar; 赠送Maven依赖信息文件:lucene-...
赠送jar包:lucene-spatial-extras-7.2.1.jar; 赠送原API文档:lucene-spatial-extras-7.2.1-javadoc.jar; 赠送源代码:lucene-spatial-extras-7.2.1-sources.jar; 赠送Maven依赖信息文件:lucene-spatial-extras...
赠送jar包:lucene-spatial-extras-6.6.0.jar; 赠送原API文档:lucene-spatial-extras-6.6.0-javadoc.jar; 赠送源代码:lucene-spatial-extras-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-spatial-extras...
赠送jar包:lucene-backward-codecs-7.2.1.jar; 赠送原API文档:lucene-backward-codecs-7.2.1-javadoc.jar; 赠送源代码:lucene-backward-codecs-7.2.1-sources.jar; 赠送Maven依赖信息文件:lucene-backward-...
赠送jar包:lucene-backward-codecs-6.6.0.jar; 赠送原API文档:lucene-backward-codecs-6.6.0-javadoc.jar; 赠送源代码:lucene-backward-codecs-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-backward-...
赠送jar包:lucene-backward-codecs-6.6.0.jar; 赠送原API文档:lucene-backward-codecs-6.6.0-javadoc.jar; 赠送源代码:lucene-backward-codecs-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-backward-...
赠送jar包:lucene-core-7.2.1.jar; 赠送原API文档:lucene-core-7.2.1-javadoc.jar; 赠送源代码:lucene-core-7.2.1-sources.jar; 赠送Maven依赖信息文件:lucene-core-7.2.1.pom; 包含翻译后的API文档:lucene...
赠送jar包:lucene-suggest-6.6.0.jar; 赠送原API文档:lucene-suggest-6.6.0-javadoc.jar; 赠送源代码:lucene-suggest-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-suggest-6.6.0.pom; 包含翻译后的API...
赠送jar包:lucene-highlighter-6.6.0.jar; 赠送原API文档:lucene-highlighter-6.6.0-javadoc.jar; 赠送源代码:lucene-highlighter-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-highlighter-6.6.0.pom;...
赠送jar包:lucene-core-6.6.0.jar; 赠送原API文档:lucene-core-6.6.0-javadoc.jar; 赠送源代码:lucene-core-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-core-6.6.0.pom; 包含翻译后的API文档:lucene...
赠送jar包:lucene-sandbox-7.2.1.jar; 赠送原API文档:lucene-sandbox-7.2.1-javadoc.jar; 赠送源代码:lucene-sandbox-7.2.1-sources.jar; 赠送Maven依赖信息文件:lucene-sandbox-7.2.1.pom; 包含翻译后的API...
赠送jar包:lucene-memory-6.6.0.jar; 赠送原API文档:lucene-memory-6.6.0-javadoc.jar; 赠送源代码:lucene-memory-6.6.0-sources.jar; 赠送Maven依赖信息文件:lucene-memory-6.6.0.pom; 包含翻译后的API文档...
赠送jar包:lucene-spatial-extras-7.7.0.jar; 赠送原API文档:lucene-spatial-extras-7.7.0-javadoc.jar; 赠送源代码:lucene-spatial-extras-7.7.0-sources.jar; 赠送Maven依赖信息文件:lucene-spatial-extras...
赠送jar包:lucene-backward-codecs-7.7.0.jar; 赠送原API文档:lucene-backward-codecs-7.7.0-javadoc.jar; 赠送源代码:lucene-backward-codecs-7.7.0-sources.jar; 赠送Maven依赖信息文件:lucene-backward-...
赠送jar包:lucene-analyzers-common-7.7.0.jar; 赠送原API文档:lucene-analyzers-common-7.7.0-javadoc.jar; 赠送源代码:lucene-analyzers-common-7.7.0-sources.jar; 赠送Maven依赖信息文件:lucene-...