Search in sources :

Example 1 with TupleGenerator

use of org.apache.hyracks.storage.am.common.datagen.TupleGenerator in project asterixdb by apache.

the class AbstractInvertedIndexLoadTest method hashedWordTokensInvIndexTest.

@Test
public void hashedWordTokensInvIndexTest() throws IOException {
    LSMInvertedIndexTestContext testCtx = LSMInvertedIndexTestUtils.createHashedWordInvIndexTestContext(harness, invIndexType);
    TupleGenerator tupleGen = LSMInvertedIndexTestUtils.createStringDocumentTupleGen(harness.getRandom());
    runTest(testCtx, tupleGen);
}
Also used : LSMInvertedIndexTestContext(org.apache.hyracks.storage.am.lsm.invertedindex.util.LSMInvertedIndexTestContext) TupleGenerator(org.apache.hyracks.storage.am.common.datagen.TupleGenerator) Test(org.junit.Test)

Example 2 with TupleGenerator

use of org.apache.hyracks.storage.am.common.datagen.TupleGenerator in project asterixdb by apache.

the class AbstractInvertedIndexLoadTest method ngramTokensInvIndexTest.

@Test
public void ngramTokensInvIndexTest() throws IOException {
    LSMInvertedIndexTestContext testCtx = LSMInvertedIndexTestUtils.createNGramInvIndexTestContext(harness, invIndexType);
    TupleGenerator tupleGen = LSMInvertedIndexTestUtils.createPersonNamesTupleGen(harness.getRandom());
    runTest(testCtx, tupleGen);
}
Also used : LSMInvertedIndexTestContext(org.apache.hyracks.storage.am.lsm.invertedindex.util.LSMInvertedIndexTestContext) TupleGenerator(org.apache.hyracks.storage.am.common.datagen.TupleGenerator) Test(org.junit.Test)

Example 3 with TupleGenerator

use of org.apache.hyracks.storage.am.common.datagen.TupleGenerator in project asterixdb by apache.

the class AbstractInvertedIndexSearchTest method testNGramInvIndexIndex.

private void testNGramInvIndexIndex(LSMInvertedIndexTestContext testCtx) throws IOException {
    TupleGenerator tupleGen = LSMInvertedIndexTestUtils.createPersonNamesTupleGen(harness.getRandom());
    List<IInvertedIndexSearchModifier> searchModifiers = new ArrayList<>();
    searchModifiers.add(new ConjunctiveSearchModifier());
    searchModifiers.add(new JaccardSearchModifier(1.0f));
    searchModifiers.add(new JaccardSearchModifier(0.8f));
    searchModifiers.add(new JaccardSearchModifier(0.5f));
    searchModifiers.add(new EditDistanceSearchModifier(LSMInvertedIndexTestUtils.TEST_GRAM_LENGTH, 0));
    searchModifiers.add(new EditDistanceSearchModifier(LSMInvertedIndexTestUtils.TEST_GRAM_LENGTH, 1));
    searchModifiers.add(new EditDistanceSearchModifier(LSMInvertedIndexTestUtils.TEST_GRAM_LENGTH, 2));
    searchModifiers.add(new EditDistanceSearchModifier(LSMInvertedIndexTestUtils.TEST_GRAM_LENGTH, 3));
    runTest(testCtx, tupleGen, searchModifiers);
}
Also used : IInvertedIndexSearchModifier(org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedIndexSearchModifier) JaccardSearchModifier(org.apache.hyracks.storage.am.lsm.invertedindex.search.JaccardSearchModifier) ArrayList(java.util.ArrayList) TupleGenerator(org.apache.hyracks.storage.am.common.datagen.TupleGenerator) EditDistanceSearchModifier(org.apache.hyracks.storage.am.lsm.invertedindex.search.EditDistanceSearchModifier) ConjunctiveSearchModifier(org.apache.hyracks.storage.am.lsm.invertedindex.search.ConjunctiveSearchModifier)

Example 4 with TupleGenerator

use of org.apache.hyracks.storage.am.common.datagen.TupleGenerator in project asterixdb by apache.

the class AbstractInvertedIndexDeleteTest method hashedWordTokensInvIndexTest.

@Test
public void hashedWordTokensInvIndexTest() throws IOException {
    LSMInvertedIndexTestContext testCtx = LSMInvertedIndexTestUtils.createHashedWordInvIndexTestContext(harness, invIndexType);
    TupleGenerator tupleGen = LSMInvertedIndexTestUtils.createStringDocumentTupleGen(harness.getRandom());
    runTest(testCtx, tupleGen);
}
Also used : LSMInvertedIndexTestContext(org.apache.hyracks.storage.am.lsm.invertedindex.util.LSMInvertedIndexTestContext) TupleGenerator(org.apache.hyracks.storage.am.common.datagen.TupleGenerator) Test(org.junit.Test)

Example 5 with TupleGenerator

use of org.apache.hyracks.storage.am.common.datagen.TupleGenerator in project asterixdb by apache.

the class AbstractInvertedIndexLoadTest method hashedNGramTokensInvIndexTest.

@Test
public void hashedNGramTokensInvIndexTest() throws IOException {
    LSMInvertedIndexTestContext testCtx = LSMInvertedIndexTestUtils.createHashedNGramInvIndexTestContext(harness, invIndexType);
    TupleGenerator tupleGen = LSMInvertedIndexTestUtils.createPersonNamesTupleGen(harness.getRandom());
    runTest(testCtx, tupleGen);
}
Also used : LSMInvertedIndexTestContext(org.apache.hyracks.storage.am.lsm.invertedindex.util.LSMInvertedIndexTestContext) TupleGenerator(org.apache.hyracks.storage.am.common.datagen.TupleGenerator) Test(org.junit.Test)

Aggregations

TupleGenerator (org.apache.hyracks.storage.am.common.datagen.TupleGenerator)14 LSMInvertedIndexTestContext (org.apache.hyracks.storage.am.lsm.invertedindex.util.LSMInvertedIndexTestContext)10 Test (org.junit.Test)10 ArrayList (java.util.ArrayList)2 ISerializerDeserializer (org.apache.hyracks.api.dataflow.value.ISerializerDeserializer)2 UTF8StringSerializerDeserializer (org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer)2 TestWorkloadConf (org.apache.hyracks.storage.am.common.TestWorkloadConf)2 IFieldValueGenerator (org.apache.hyracks.storage.am.common.datagen.IFieldValueGenerator)2 SortedIntegerFieldValueGenerator (org.apache.hyracks.storage.am.common.datagen.SortedIntegerFieldValueGenerator)2 IInvertedIndexSearchModifier (org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedIndexSearchModifier)2 ConjunctiveSearchModifier (org.apache.hyracks.storage.am.lsm.invertedindex.search.ConjunctiveSearchModifier)2 JaccardSearchModifier (org.apache.hyracks.storage.am.lsm.invertedindex.search.JaccardSearchModifier)2 DocumentStringFieldValueGenerator (org.apache.hyracks.storage.am.common.datagen.DocumentStringFieldValueGenerator)1 PersonNameFieldValueGenerator (org.apache.hyracks.storage.am.common.datagen.PersonNameFieldValueGenerator)1 EditDistanceSearchModifier (org.apache.hyracks.storage.am.lsm.invertedindex.search.EditDistanceSearchModifier)1