`
cleaneyes
  • 浏览: 336161 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
主题:spring源码分析-XmlBeanFactory导读 private final XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this); public class XmlBeanFactory extends DefaultListableBeanFactory public XmlBeanFactory(Resource resource) public XmlBeanFactory(Resource resource, BeanFactory parentBeanFactory)     利用thi ...
第十六拿手好戏:谚语精选-充满智慧之言谈 1. All work and no play makes Jack a dull boy.2. Great minds think alike.3. No news is good news. (没消息就是好消息。)4. One picture is worth a thousand words. (百闻不如一见。)5. Nothing ventured, nothing gained. (不入虎穴,焉得虎子。)6. Life is full of ups and downs. (生活充满起伏。)7. It's no use crying over s ...
第九拿手好戏:人的生命和活力之源-工作(二)  48. The times have been very bad. (时机一直很坏。)49. We are in the red. (我们有亏损/赤字。)50. The company went broke. (这家公司破产了。)51. I visited Japan on an observation tour of its industries. (我到日本观摩它的工业。)52. I have to feed a family of five〖养活五口之家〗.53. I've got to keep my nose to the grindst ...
第六拿手好戏:男女之间-永恒的主题 1. Are you married or single?2. Do you have anyone in mind?3. I've been dying to see you. (我一直好想见你。)4. My girlfriend and I broke up.5. How did you get to know her? (你是怎么认识她的。)6. How long have you known her?7. She is not my kind of girl. (她不是我喜欢的那一种。)8. He was our go-between. (他是我们的媒 ...
第四拿手好戏:感谢-美好人生的添加剂 1. Thank you for everything. /Thank you very much indeed.2. I appreciate it /your help very much. 3. I don't know how to thank you enough.4. It's kind of you to say that.5. You've been a great help /very helpful.6. Thanks a million, Mr. Lee, for what you have done for me.7. I hope ...
第二拿手好戏:和陌生人相识相知相交-非凡的能力 A: Mary, this is Stone's brother Jim.B: I'm very glad/pleased to meet you.C: It's a pleasure to meet you. /The pleasure is mine.B: How do you like China so far? /What's your impression of China? /What do you think of China?C: Its really different from what I expected.B: Don't ...
第一拿手好戏:社交性寒暄的全面总结  1. A: How are you doing? B: I'm doing fine/OK/pretty well/great/super/terrific/so-so. 或: Not bad. /The same as ever. /I can't complain too much. (我不能太抱怨。/还不错。)B: Terrible. I've had a headache all morning. 2. A: How's it going? B: Fine. /Pretty good.A: How's everything with you/goin ...
 public abstract class Analyzer { public abstract TokenStream tokenStream(String fieldName, Reader reader); * * @param fieldName Field name being indexed. * @return position increment gap, added to the next token emitted from {@link #tokenStream(String,Reader)} */ public int getPosi ...
/** * 關鍵詞提醒 * @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); ...
無特別之處,了解的朋友不用看。 /** * 限制分類的搜索 * @param keyword * @param categoryKeyword * @return * @throws LuceneException */ public List searchIndex(String keyword, String categoryKeyword) throws LuceneException{ Analyzer analyzer = new CJKAnalyzer(); BooleanQuery query = new BooleanQuery() ...
txt與html解析存在亂碼的問題,這個問題困擾了我好幾天,最後找到一些資料,通過多次嘗試,基本解決了。   public class TxtDocHander extends DocHander { public Document getDocument(byte[] inputByte) throws IOException { // 進行文檔的編碼格式識別 CodepageDetectorProxy codepageDetectorProxy = CodepageDetectorProxy.getInstance(); codepageDetectorProxy.add( ...
上篇有提到這段代碼: DocHander docHander = DocHanderFactory.buildDocHander(fileName); attachDocument = docHander.getDocument(attach);   下面我們看一看實現細節。   抽象類DocHander的代碼: public abstract class DocHander { public static String FIELD_CONTENT = "contents"; public abstract D ...
/** * 文檔主體建立索引 * 注意文檔與附件分成不同的Document,但搜索到附件內容時,需鏈接到其所在文檔 * @param article * @return * @throws InterruptedException * @throws Exception */ private Document createArticleIndex(Article article) throws Exception{ Document document = new Document(); //ID document.add(new Field ...
對索引操作的類為KbIndexProcesser  文檔主體類:Article public class Article { private String id; private String topic; private String content; private String categoryId; private String category; ....... }  附件實體類:ArticleAttach public class ArticleAttach { private String id; private String articleId; priv ...
       《Lucene實戰開發手記》系列文章的適用對象為Lucene初學者。       本人所在項目組正在開發一個Call Center的系統。需要開發一個知識庫來為客服提供知識搜索的支持。採用Lucene做為搜索引擎。   知識庫的需求如下: 1、知識庫以文檔的形式組織,每篇文檔含標題、分類(樹狀)、內容,可上傳多個附件。 2、文檔內容支持html格式,標題、內容、附件均要建立索引,能被搜索到。附件格式支持doc,xls,pdf,txt,htm,html 3、按關鍵詞搜索標題、內容、附件,隻要其一包含關鍵詞則該文檔被列出,支持按分類限制搜索范圍 4、高亮顯示搜索到內容的關鍵文字,暫不要 ...
Global site tag (gtag.js) - Google Analytics