public class CachedIListReader extends Object implements IListReader
IListReader
implementation that uses a cache to retrieve posting lists.Constructor and Description |
---|
CachedIListReader(CachedRider cachedBarrel,
Barrel barrel,
String term,
int pageSize)
Constructor for the CachedIListReader object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this reader.
|
long |
getPostings()
Returns the number of items in the inverted list this object reads (including removed ones).
|
String |
getTerm()
Returns the term that owns this inverted list.
|
boolean |
next()
Move to the next item in the inverted list.
|
Proximities |
openProx()
Returns an access object to the proximity list.
|
boolean |
skipTo(long uid)
Skips (forward) in the inverted list to the first item with an ID greater than or equal to the given
uid identification. |
long |
uid()
Returns the UID of the current document;
|
int |
weight()
Returns the weight of the document.
|
public CachedIListReader(CachedRider cachedBarrel, Barrel barrel, String term, int pageSize)
cachedBarrel
- cache used to retrieve inverted list pagesbarrel
- original barrel that stores the non-cached inverted listterm
- term that owns this inverted listpageSize
- size of single cached inverted list partitionpublic boolean next()
next
in interface IListReader
public boolean skipTo(long uid)
uid
identification.skipTo
in interface IListReader
uid
- the item to skip topublic long uid()
public int weight()
public Proximities openProx()
public long getPostings()
getPostings
in interface IListReader
public String getTerm()
getTerm
in interface IListReader
public void close()
close
in interface AutoCloseable
close
in interface IListReader
Copyright © 2016 Egothor. All Rights Reserved.