lucene
烂笔头_chang
这个作者很懒,什么都没留下…
展开
-
lucene工具类-ByteBlockPool
slice具体使用 ByteSliceWriter ByteSliceReaderByteBlockPool维护多个字节数组,可自动扩容,来对外提供基本的字节类型数据存储的功能,类似于jdk ArrayList数据的实现,调用者可以把ByteBlockPool当成是一个无限扩容的数组使用slice在ByteBlockPool基础上 又抽象出slice的逻辑,slice是ByteBlo...原创 2019-04-27 18:32:22 · 332 阅读 · 0 评论 -
lucene工具类-BytesRefHash
BytesRefHash 通过hash的方式写入BytesRef ,每写入BytesRef先hash,在ids中对应位置找,如果位置为-1,没有写入,否则就是已存在,可以通过对应的值在bytesStart中找到起始位置hashcode=findHash(BytesRef)index=ids[hashcode]bytestart=bytesStart[index]写入BytesRef的字节前...原创 2019-04-28 20:01:55 · 508 阅读 · 0 评论 -
lucene工具类-DocIdsWriter
org.apache.lucene.util.bkd写入static void writeDocIds(int[] docIds, int start, int count, DataOutput out) throws IOException { // docs can be sorted either when all docs in a block have the same v...原创 2019-05-09 08:35:55 · 166 阅读 · 0 评论