use of org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer in project hibernate-search by hibernate.
the class FieldSearchProjectionTypeCheckingAndConversionIT method initData.
private static void initData() {
BulkIndexer mainIndexer = mainIndex.bulkIndexer().add(DOCUMENT_1, document -> initDocument(mainIndex.binding(), document, 1)).add(DOCUMENT_2, document -> initDocument(mainIndex.binding(), document, 2)).add(DOCUMENT_3, document -> initDocument(mainIndex.binding(), document, 3)).add(EMPTY, document -> {
});
BulkIndexer compatibleIndexer = compatibleIndex.bulkIndexer().add(COMPATIBLE_INDEX_DOCUMENT_1, document -> {
compatibleIndex.binding().fieldModels.forEach(f -> addFieldValue(document, f, 1));
compatibleIndex.binding().fieldWithConverterModels.forEach(f -> addFieldValue(document, f, 1));
});
BulkIndexer rawFieldCompatibleIndexer = rawFieldCompatibleIndex.bulkIndexer().add(RAW_FIELD_COMPATIBLE_INDEX_DOCUMENT_1, document -> rawFieldCompatibleIndex.binding().fieldWithConverterModels.forEach(f -> addFieldValue(document, f, 1)));
BulkIndexer missingFieldIndexer = missingFieldIndex.bulkIndexer().add(MISSING_FIELD_INDEX_DOCUMENT_1, document -> {
});
mainIndexer.join(compatibleIndexer, rawFieldCompatibleIndexer, missingFieldIndexer);
}
use of org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer in project hibernate-search by hibernate.
the class FieldSearchProjectionMultiValuedBaseIT method setup.
@BeforeClass
public static void setup() {
setupHelper.start().withIndex(index).setup();
BulkIndexer indexer = index.bulkIndexer();
for (DataSet<?> dataSet : dataSets) {
dataSet.contribute(indexer);
}
indexer.join();
}
use of org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer in project hibernate-search by hibernate.
the class FieldSearchSortTypeCheckingAndConversionIT method initData.
private static void initData() {
BulkIndexer mainIndexer = mainIndex.bulkIndexer().add(DOCUMENT_2, document -> initDocument(mainIndex.binding(), document, DOCUMENT_2_ORDINAL)).add(EMPTY, document -> initDocument(mainIndex.binding(), document, null)).add(DOCUMENT_1, document -> initDocument(mainIndex.binding(), document, DOCUMENT_1_ORDINAL)).add(DOCUMENT_3, document -> initDocument(mainIndex.binding(), document, DOCUMENT_3_ORDINAL));
BulkIndexer compatibleIndexer = compatibleIndex.bulkIndexer().add(COMPATIBLE_INDEX_DOCUMENT_1, document -> {
CompatibleIndexBinding binding = compatibleIndex.binding();
binding.fieldModels.forEach(fieldModel -> addValue(fieldModel, document, DOCUMENT_1_ORDINAL));
binding.fieldWithDslConverterModels.forEach(fieldModel -> addValue(fieldModel, document, DOCUMENT_1_ORDINAL));
});
BulkIndexer rawFieldCompatibleIndexer = rawFieldCompatibleIndex.bulkIndexer().add(RAW_FIELD_COMPATIBLE_INDEX_DOCUMENT_1, document -> initDocument(rawFieldCompatibleIndex.binding(), document, DOCUMENT_1_ORDINAL));
BulkIndexer missingFieldIndexer = missingFieldIndex.bulkIndexer().add(MISSING_FIELD_INDEX_DOCUMENT_1, document -> {
});
mainIndexer.join(compatibleIndexer, rawFieldCompatibleIndexer, missingFieldIndexer);
}
use of org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer in project hibernate-search by hibernate.
the class DistanceSearchProjectionMultiValuedBaseIT method setup.
@BeforeClass
public static void setup() {
setupHelper.start().withIndexes(mainIndex, sortableIndex).setup();
BulkIndexer mainIndexer = mainIndex.bulkIndexer();
BulkIndexer sortableIndexer = sortableIndex.bulkIndexer();
for (DataSet dataSet : dataSets) {
dataSet.contribute(mainIndexer, sortableIndexer);
}
mainIndexer.join(sortableIndexer);
}
use of org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer in project hibernate-search by hibernate.
the class DistanceSearchProjectionSingleValuedBaseIT method setup.
@BeforeClass
public static void setup() {
setupHelper.start().withIndexes(mainIndex, sortableIndex).setup();
BulkIndexer mainIndexer = mainIndex.bulkIndexer();
BulkIndexer sortableIndexer = sortableIndex.bulkIndexer();
for (DataSet dataSet : dataSets) {
dataSet.contribute(mainIndexer, sortableIndexer);
}
mainIndexer.join(sortableIndexer);
}
Aggregations