blob: f0f310f19623ea6101a5effb454f6e09ec2f44af (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.predicate.index;
/**
* Interface for posting lists to be used by the algorithm implemented in PredicateSearch.
*
* @author <a href="mailto:magnarn@yahoo-inc.com">Magnar Nedland</a>
*/
public interface PostingList {
/**
* Moves the posting list past the supplied document id.
* @param docId Document id to move past.
* @return True if a new document was found
*/
boolean nextDocument(int docId);
/**
* Prepare iterator for interval iteration.
* @return True if the iterator has any intervals.
*/
boolean prepareIntervals();
/**
* Fetches the next interval for the current document.
* @return True if there was a next interval
*/
boolean nextInterval();
/**
* @return The doc id for the current document
*/
int getDocId();
/**
* @return The number of documents (actual count or estimate)
*/
int size();
/**
* @return The current interval for the current document
*/
int getInterval();
/**
* @return the subquery bitmap for this posting list.
*/
long getSubquery();
/**
* @return The document ids
*/
int[] getDocIds();
}
|