更改:
刪除字典類中過時的導入和導出方法。
改進:
在搜索查詢中實現特殊字符轉義
String indexFolder = "c:\\MyIndex"; String documentFolder = "c:\\MyDocuments"; // Creating index Index index = new Index(indexFolder); // Marking character '&' as a valid letter, not a separator index.getDictionaries().getAlphabet().setRange(new char[] { '&' }, CharacterType.Letter); // Adding documents to index index.addToIndex(documentFolder); // Searching for word 'R&B' SearchResults results0 = index.search("R\\&B"); // Searching for word 'R&B' SearchResults results1 = index.search("R\\u0026B");
索引其他zip存檔中的zip存檔
String indexFolder = "c:\\MyIndex"; String documentFolder = "c:\\MyDocuments"; // Creating index Index index = new Index(indexFolder); // Adding documents to index // ZIP archives and ZIP archives inside those archives will be automatically added to index index.addToIndex(documentFolder); // Searching SearchResults results = index.search("zip");
更新時間:2017-11-10 11:06:09.000 | 錄入時間:2017-01-09 16:26:41.000 | 責任編輯:胡濤