書名: 自己動手寫分布式搜索引擎作者名: 羅剛本章字數: 168字更新時間: 2020-11-28 15:52:42
2.3 讀入索引文件
如果詞表太大,則只讀入最上面幾層的索引。為了批量讀入數據,把數據分頁存放。參考B樹索引的分頁讀取。
public class Page{ public Page() { data = new byte[MAX_SPACE]; } public Page(byte[] apage) { data = apage; } /** *返回數據的字節數組 * * @return頁面的字節數組 */ public byte[] getpage() { return data; } /** *用給定的字節數組設置頁面 * * @param array * 頁面大小的字節數組 */ public void setpage(byte[] array) { data = array; } public byte[] getData() { return this.data; } /** *受保護的屬性:字節數組 * */ protected byte[] data; }
推薦閱讀
- vtiger CRM Beginner's Guide
- Getting Started with Microsoft Application Virtualization 4.6
- Hi!扁平化Photoshop扁平化用戶界面設計教程
- 中文版Illustrator 2021完全自學教程
- 數字孿生體:第四次工業革命的通用目的技術
- 中文版Maya 2022完全自學教程
- Adobe創意大學Illustrator CS5 產品專家認證標準教材
- 中文版After Effects CC 2018 動漫、影視特效后期合成秘技
- CINEMA 4D R20完全實戰技術手冊
- Drupal 7
- 3ds Max 2014/VRay效果圖制作實戰從入門到精通
- Pluggable Authentication Modules: The Definitive Guide to PAM for Linux SysAdmins and C Developers
- Illustrator CS6平面設計案例教程(微課版)
- 從小白到高手:Studio One快速上手教程
- Excel 2016數據處理與分析(微課版)