use of org.apache.hyracks.storage.am.lsm.invertedindex.search.JaccardSearchModifier 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);
}
use of org.apache.hyracks.storage.am.lsm.invertedindex.search.JaccardSearchModifier in project asterixdb by apache.
the class AbstractInvertedIndexSearchTest method testWordInvIndexIndex.
private void testWordInvIndexIndex(LSMInvertedIndexTestContext testCtx) throws IOException {
TupleGenerator tupleGen = LSMInvertedIndexTestUtils.createStringDocumentTupleGen(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));
runTest(testCtx, tupleGen, searchModifiers);
}
Aggregations