Package org.terrier.structures.postings
Class PostingTestUtils
- java.lang.Object
-
- org.terrier.structures.postings.PostingTestUtils
-
public class PostingTestUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PostingTestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertEqualsBitFilePosition(BitIndexPointer expected, BitFilePosition actual)
static void
compareBlockFieldPostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings)
static void
compareBlockPostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings)
static void
compareFieldPostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings)
static void
comparePostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings)
static void
comparePostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings, boolean docidsOnly)
static void
comparePostingsDocids(java.util.List<Posting> inputPostings, IterablePosting outputPostings)
static java.util.Iterator<BitIndexPointer>
makeSkippable(java.util.Iterator<BitIndexPointer> in)
static void
testPostingIds(IterablePosting ip, int[] ids)
static java.io.DataInput
writeBlockFieldPostingsToData(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
static java.lang.String
writeBlockFieldPostingsToFile(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
static java.io.DataInput
writeBlockPostingsToData(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
static java.lang.String
writeBlockPostingsToFile(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
static java.io.DataInput
writeFieldPostingsToData(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
static java.lang.String
writeFieldPostingsToFile(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
static java.io.DataInput
writePostingsToData(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
static java.lang.String
writePostingsToFile(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
static java.lang.String
writePostingsToFileDocidOnly(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList)
-
-
-
Method Detail
-
testPostingIds
public static void testPostingIds(IterablePosting ip, int[] ids) throws java.lang.Exception
- Throws:
java.lang.Exception
-
assertEqualsBitFilePosition
public static void assertEqualsBitFilePosition(BitIndexPointer expected, BitFilePosition actual)
-
comparePostings
public static void comparePostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings, boolean docidsOnly) throws java.lang.Exception
- Throws:
java.lang.Exception
-
comparePostings
public static void comparePostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings) throws java.lang.Exception
- Throws:
java.lang.Exception
-
comparePostingsDocids
public static void comparePostingsDocids(java.util.List<Posting> inputPostings, IterablePosting outputPostings) throws java.lang.Exception
- Throws:
java.lang.Exception
-
compareBlockPostings
public static void compareBlockPostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings) throws java.lang.Exception
- Throws:
java.lang.Exception
-
compareFieldPostings
public static void compareFieldPostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings) throws java.lang.Exception
- Throws:
java.lang.Exception
-
compareBlockFieldPostings
public static void compareBlockFieldPostings(java.util.List<Posting> inputPostings, IterablePosting outputPostings) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeBlockPostingsToFile
public static java.lang.String writeBlockPostingsToFile(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeBlockPostingsToData
public static java.io.DataInput writeBlockPostingsToData(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeFieldPostingsToFile
public static java.lang.String writeFieldPostingsToFile(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeFieldPostingsToData
public static java.io.DataInput writeFieldPostingsToData(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeBlockFieldPostingsToFile
public static java.lang.String writeBlockFieldPostingsToFile(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writeBlockFieldPostingsToData
public static java.io.DataInput writeBlockFieldPostingsToData(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writePostingsToFile
public static java.lang.String writePostingsToFile(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writePostingsToData
public static java.io.DataInput writePostingsToData(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
writePostingsToFileDocidOnly
public static java.lang.String writePostingsToFileDocidOnly(java.util.Iterator<Posting>[] iterators, java.util.List<BitIndexPointer> pointerList) throws java.lang.Exception
- Throws:
java.lang.Exception
-
makeSkippable
public static java.util.Iterator<BitIndexPointer> makeSkippable(java.util.Iterator<BitIndexPointer> in)
-
-