(list []uint32, trigram uint32, restrict []uint32)
| 311 | } |
| 312 | |
| 313 | func (ix *Index) postingOr(list []uint32, trigram uint32, restrict []uint32) []uint32 { |
| 314 | var r postReader |
| 315 | r.init(ix, trigram, restrict) |
| 316 | x := make([]uint32, 0, len(list)+r.max()) |
| 317 | i := 0 |
| 318 | for r.next() { |
| 319 | fileid := r.fileid |
| 320 | for i < len(list) && list[i] < fileid { |
| 321 | x = append(x, list[i]) |
| 322 | i++ |
| 323 | } |
| 324 | x = append(x, fileid) |
| 325 | if i < len(list) && list[i] == fileid { |
| 326 | i++ |
| 327 | } |
| 328 | } |
| 329 | x = append(x, list[i:]...) |
| 330 | return x |
| 331 | } |
| 332 | |
| 333 | func (ix *Index) PostingQuery(q *Query) []uint32 { |
| 334 | return ix.postingQuery(q, nil) |
no test coverage detected