public class MemoryIList extends Object implements IListReader, IListWriter, Proximities
Modifier and Type | Method and Description |
---|---|
void |
append(long new_uid,
IListItem item)
Append a new inverted list item.
|
void |
close()
Close the reader.
|
void |
closeProx()
Close this list and release resources.
|
long |
getPostings()
Return the number of items in the inverted list this object reads
(including removed ones).
|
String |
getTerm()
Return the term that owns this inverted list.
|
int |
leftProx()
Return the number of items in the proximity list which were not read yet.
|
boolean |
next()
Move to the next item in the inverted list.
|
Proximities |
openProx()
Return an access object to the proximity list.
|
int |
readProx()
Read this object's inverted list.
|
int |
readProx(int[] prox,
int offset,
int len)
Read an inverted list of length greater than 1.
|
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()
Identification of the document.
|
int |
weight()
Calculated vector value.
|
public void append(long new_uid, IListItem item) throws IOException
IListWriter
append
in interface IListWriter
new_uid
- The new item identification.item
- The inverted list item.IOException
public void close()
IListReader
close
in interface AutoCloseable
close
in interface IListReader
close
in interface IListWriter
public long getPostings()
IListReader
getPostings
in interface IListReader
public String getTerm()
IListReader
getTerm
in interface IListReader
public boolean next()
IListReader
next
in interface IListReader
public boolean skipTo(long uid)
IListReader
uid
identification.skipTo
in interface IListReader
uid
- the item to skip topublic long uid()
IListItem
public int weight()
IListItem
public Proximities openProx()
IListItem
public void closeProx()
Proximities
closeProx
in interface Proximities
public int leftProx()
Proximities
leftProx
in interface Proximities
public int readProx() throws IOException
Proximities
readProx
in interface Proximities
IOException
public int readProx(int[] prox, int offset, int len) throws IOException
Proximities
readProx
in interface Proximities
prox
- the bufferoffset
- first cell to filllen
- how many cell are readIOException
Copyright © 2016 Egothor. All Rights Reserved.