()
| 183 | } |
| 184 | |
| 185 | func (ix *Index) dumpPosting() { |
| 186 | d := ix.slice(ix.postIndex, postEntrySize*ix.numPost) |
| 187 | for i := 0; i < ix.numPost; i++ { |
| 188 | j := i * postEntrySize |
| 189 | t := uint32(d[j])<<16 | uint32(d[j+1])<<8 | uint32(d[j+2]) |
| 190 | count := int(binary.BigEndian.Uint32(d[j+3:])) |
| 191 | offset := binary.BigEndian.Uint32(d[j+3+4:]) |
| 192 | log.Printf("%#x: %d at %d", t, count, offset) |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | func (ix *Index) findList(trigram uint32) (count int, offset uint32) { |
| 197 | // binary search |