Package com.yahoo.search.predicate.index
Class SimpleIndex
- java.lang.Object
-
- com.yahoo.search.predicate.index.SimpleIndex
-
public class SimpleIndex extends java.lang.Object
An index mapping keys of type Long to lists of postings of generic data.- Author:
- Magnar Nedland, bjorncs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleIndex.Builder
static class
SimpleIndex.Entry
-
Constructor Summary
Constructors Constructor Description SimpleIndex(org.eclipse.collections.api.map.primitive.LongObjectMap<SimpleIndex.Entry> dictionary)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleIndex
fromInputStream(java.io.DataInputStream in)
SimpleIndex.Entry
getPostingList(long key)
Retrieves a posting list for a given keyvoid
writeToOutputStream(java.io.DataOutputStream out)
-
-
-
Constructor Detail
-
SimpleIndex
public SimpleIndex(org.eclipse.collections.api.map.primitive.LongObjectMap<SimpleIndex.Entry> dictionary)
-
-
Method Detail
-
getPostingList
public SimpleIndex.Entry getPostingList(long key)
Retrieves a posting list for a given key- Parameters:
key
- the key to lookup- Returns:
- list of postings
-
writeToOutputStream
public void writeToOutputStream(java.io.DataOutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
fromInputStream
public static SimpleIndex fromInputStream(java.io.DataInputStream in) throws java.io.IOException
- Throws:
java.io.IOException
-
-