Search in sources :

Example 1 with FieldTypeDescriptor

use of org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor in project hibernate-search by hibernate.

the class FieldSearchSortTypeCheckingAndConversionIT method multiIndex_withMissingFieldIndex_nested.

/**
 * Test the behavior when even the <strong>parent</strong> field of the field to sort on is missing,
 * and that parent field is <strong>nested</strong> in the main index.
 */
@Test
@TestForIssue(jiraKey = "HSEARCH-4173")
public void multiIndex_withMissingFieldIndex_nested() {
    assumeTrue("This backend doesn't support sorts on a field of type '" + fieldTypeDescriptor + "' that is missing from some of the target indexes.", TckConfiguration.get().getBackendFeatures().supportsFieldSortWhenFieldMissingInSomeTargetIndexes(fieldTypeDescriptor.getJavaType()));
    assumeTrue("This backend doesn't support field sorts on a nested field that is missing from some of the target indexes.", TckConfiguration.get().getBackendFeatures().supportsFieldSortWhenNestedFieldMissingInSomeTargetIndexes());
    StubMappingScope scope = mainIndex.createScope(missingFieldIndex);
    SearchQuery<DocumentReference> query;
    String fieldPath = getFieldInNestedPath();
    query = matchNonEmptyQuery(f -> f.field(fieldPath).asc().missing().use(getSingleValueForMissingUse(BEFORE_DOCUMENT_1_ORDINAL)), scope);
    /*
		 * Not testing the ordering of results here because it's not what we are interested in:
		 * we just want to check that fields are correctly detected as compatible,
		 * that no exception is thrown and that the query is correctly executed on all indexes
		 * with no silent error (HSEARCH-4173).
		 */
    assertThatQuery(query).hasDocRefHitsAnyOrder(b -> {
        b.doc(missingFieldIndex.typeName(), MISSING_FIELD_INDEX_DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_2);
        b.doc(mainIndex.typeName(), DOCUMENT_3);
    });
}
Also used : SearchException(org.hibernate.search.util.common.SearchException) SimpleFieldModelsByType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModelsByType) IndexObjectFieldReference(org.hibernate.search.engine.backend.document.IndexObjectFieldReference) BeforeClass(org.junit.BeforeClass) SimpleFieldModel(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModel) Searchable(org.hibernate.search.engine.backend.types.Searchable) RunWith(org.junit.runner.RunWith) SortFinalStep(org.hibernate.search.engine.search.sort.dsl.SortFinalStep) SearchSetupHelper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.rule.SearchSetupHelper) SearchResultAssert.assertThatQuery(org.hibernate.search.util.impl.integrationtest.common.assertion.SearchResultAssert.assertThatQuery) SearchSortFactory(org.hibernate.search.engine.search.sort.dsl.SearchSortFactory) Function(java.util.function.Function) ObjectStructure(org.hibernate.search.engine.backend.types.ObjectStructure) ArrayList(java.util.ArrayList) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) BulkIndexer(org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer) Locale(java.util.Locale) SimpleMappedIndex(org.hibernate.search.util.impl.integrationtest.mapper.stub.SimpleMappedIndex) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) ValueConvert(org.hibernate.search.engine.search.common.ValueConvert) FailureReportUtils(org.hibernate.search.util.impl.integrationtest.common.FailureReportUtils) ClassRule(org.junit.ClassRule) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) DocumentElement(org.hibernate.search.engine.backend.document.DocumentElement) Parameterized(org.junit.runners.Parameterized) ValueWrapper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.ValueWrapper) FieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor) Sortable(org.hibernate.search.engine.backend.types.Sortable) EventContexts(org.hibernate.search.engine.reporting.spi.EventContexts) Test(org.junit.Test) IndexSchemaElement(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaElement) IndexSchemaObjectField(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaObjectField) InvalidType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.InvalidType) NormalizedStringFieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.NormalizedStringFieldTypeDescriptor) Consumer(java.util.function.Consumer) List(java.util.List) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue) Aggregable(org.hibernate.search.engine.backend.types.Aggregable) StandardIndexFieldTypeOptionsStep(org.hibernate.search.engine.backend.types.dsl.StandardIndexFieldTypeOptionsStep) SearchQuery(org.hibernate.search.engine.search.query.SearchQuery) Assume.assumeTrue(org.junit.Assume.assumeTrue) Projectable(org.hibernate.search.engine.backend.types.Projectable) TckConfiguration(org.hibernate.search.integrationtest.backend.tck.testsupport.util.TckConfiguration) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) Test(org.junit.Test) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue)

Example 2 with FieldTypeDescriptor

use of org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor in project hibernate-search by hibernate.

the class FieldSortTypeCheckingAndConversionIT method multiIndex_withMissingFieldIndex_nested.

/**
 * Test the behavior when even the <strong>parent</strong> field of the field to sort on is missing,
 * and that parent field is <strong>nested</strong> in the main index.
 */
@Test
@TestForIssue(jiraKey = "HSEARCH-4173")
public void multiIndex_withMissingFieldIndex_nested() {
    assumeTrue("This backend doesn't support sorts on a field of type '" + fieldTypeDescriptor + "' that is missing from some of the target indexes.", TckConfiguration.get().getBackendFeatures().supportsFieldSortWhenFieldMissingInSomeTargetIndexes(fieldTypeDescriptor.getJavaType()));
    assumeTrue("This backend doesn't support field sorts on a nested field that is missing from some of the target indexes.", TckConfiguration.get().getBackendFeatures().supportsFieldSortWhenNestedFieldMissingInSomeTargetIndexes());
    StubMappingScope scope = mainIndex.createScope(missingFieldIndex);
    SearchQuery<DocumentReference> query;
    String fieldPath = getFieldInNestedPath();
    query = matchNonEmptyQuery(f -> f.field(fieldPath).asc().missing().use(getSingleValueForMissingUse(BEFORE_DOCUMENT_1_ORDINAL)), scope);
    /*
		 * Not testing the ordering of results here because it's not what we are interested in:
		 * we just want to check that fields are correctly detected as compatible,
		 * that no exception is thrown and that the query is correctly executed on all indexes
		 * with no silent error (HSEARCH-4173).
		 */
    assertThatQuery(query).hasDocRefHitsAnyOrder(b -> {
        b.doc(missingFieldIndex.typeName(), MISSING_FIELD_INDEX_DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_2);
        b.doc(mainIndex.typeName(), DOCUMENT_3);
    });
}
Also used : SearchException(org.hibernate.search.util.common.SearchException) SimpleFieldModelsByType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModelsByType) IndexObjectFieldReference(org.hibernate.search.engine.backend.document.IndexObjectFieldReference) BeforeClass(org.junit.BeforeClass) SimpleFieldModel(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModel) Searchable(org.hibernate.search.engine.backend.types.Searchable) RunWith(org.junit.runner.RunWith) SortFinalStep(org.hibernate.search.engine.search.sort.dsl.SortFinalStep) SearchSetupHelper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.rule.SearchSetupHelper) SearchResultAssert.assertThatQuery(org.hibernate.search.util.impl.integrationtest.common.assertion.SearchResultAssert.assertThatQuery) SearchSortFactory(org.hibernate.search.engine.search.sort.dsl.SearchSortFactory) Function(java.util.function.Function) ObjectStructure(org.hibernate.search.engine.backend.types.ObjectStructure) ArrayList(java.util.ArrayList) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) BulkIndexer(org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer) Locale(java.util.Locale) SimpleMappedIndex(org.hibernate.search.util.impl.integrationtest.mapper.stub.SimpleMappedIndex) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) ValueConvert(org.hibernate.search.engine.search.common.ValueConvert) FailureReportUtils(org.hibernate.search.util.impl.integrationtest.common.reporting.FailureReportUtils) ClassRule(org.junit.ClassRule) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) DocumentElement(org.hibernate.search.engine.backend.document.DocumentElement) Parameterized(org.junit.runners.Parameterized) ValueWrapper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.ValueWrapper) FieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor) Sortable(org.hibernate.search.engine.backend.types.Sortable) EventContexts(org.hibernate.search.engine.reporting.spi.EventContexts) Test(org.junit.Test) IndexSchemaElement(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaElement) IndexSchemaObjectField(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaObjectField) InvalidType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.InvalidType) NormalizedStringFieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.NormalizedStringFieldTypeDescriptor) Consumer(java.util.function.Consumer) List(java.util.List) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue) Aggregable(org.hibernate.search.engine.backend.types.Aggregable) StandardIndexFieldTypeOptionsStep(org.hibernate.search.engine.backend.types.dsl.StandardIndexFieldTypeOptionsStep) SearchQuery(org.hibernate.search.engine.search.query.SearchQuery) Assume.assumeTrue(org.junit.Assume.assumeTrue) Projectable(org.hibernate.search.engine.backend.types.Projectable) TckConfiguration(org.hibernate.search.integrationtest.backend.tck.testsupport.util.TckConfiguration) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) Test(org.junit.Test) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue)

Example 3 with FieldTypeDescriptor

use of org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor in project hibernate-search by hibernate.

the class FieldSearchSortTypeCheckingAndConversionIT method multiIndex_withMissingFieldIndex_dslConverterDisabled.

@Test
@TestForIssue(jiraKey = "HSEARCH-4173")
public void multiIndex_withMissingFieldIndex_dslConverterDisabled() {
    assumeTrue("This backend doesn't support sorts on a field of type '" + fieldTypeDescriptor + "' that is missing from some of the target indexes.", TckConfiguration.get().getBackendFeatures().supportsFieldSortWhenFieldMissingInSomeTargetIndexes(fieldTypeDescriptor.getJavaType()));
    StubMappingScope scope = mainIndex.createScope(missingFieldIndex);
    SearchQuery<DocumentReference> query;
    String fieldPath = getFieldPath();
    query = matchNonEmptyQuery(f -> f.field(fieldPath).asc().missing().use(getSingleValueForMissingUse(BEFORE_DOCUMENT_1_ORDINAL), ValueConvert.NO), scope);
    /*
		 * Not testing the ordering of results here because it's not what we are interested in:
		 * we just want to check that fields are correctly detected as compatible,
		 * that no exception is thrown and that the query is correctly executed on all indexes
		 * with no silent error (HSEARCH-4173).
		 */
    assertThatQuery(query).hasDocRefHitsAnyOrder(b -> {
        b.doc(missingFieldIndex.typeName(), MISSING_FIELD_INDEX_DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_2);
        b.doc(mainIndex.typeName(), DOCUMENT_3);
    });
}
Also used : SearchException(org.hibernate.search.util.common.SearchException) SimpleFieldModelsByType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModelsByType) IndexObjectFieldReference(org.hibernate.search.engine.backend.document.IndexObjectFieldReference) BeforeClass(org.junit.BeforeClass) SimpleFieldModel(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModel) Searchable(org.hibernate.search.engine.backend.types.Searchable) RunWith(org.junit.runner.RunWith) SortFinalStep(org.hibernate.search.engine.search.sort.dsl.SortFinalStep) SearchSetupHelper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.rule.SearchSetupHelper) SearchResultAssert.assertThatQuery(org.hibernate.search.util.impl.integrationtest.common.assertion.SearchResultAssert.assertThatQuery) SearchSortFactory(org.hibernate.search.engine.search.sort.dsl.SearchSortFactory) Function(java.util.function.Function) ObjectStructure(org.hibernate.search.engine.backend.types.ObjectStructure) ArrayList(java.util.ArrayList) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) BulkIndexer(org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer) Locale(java.util.Locale) SimpleMappedIndex(org.hibernate.search.util.impl.integrationtest.mapper.stub.SimpleMappedIndex) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) ValueConvert(org.hibernate.search.engine.search.common.ValueConvert) FailureReportUtils(org.hibernate.search.util.impl.integrationtest.common.FailureReportUtils) ClassRule(org.junit.ClassRule) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) DocumentElement(org.hibernate.search.engine.backend.document.DocumentElement) Parameterized(org.junit.runners.Parameterized) ValueWrapper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.ValueWrapper) FieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor) Sortable(org.hibernate.search.engine.backend.types.Sortable) EventContexts(org.hibernate.search.engine.reporting.spi.EventContexts) Test(org.junit.Test) IndexSchemaElement(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaElement) IndexSchemaObjectField(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaObjectField) InvalidType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.InvalidType) NormalizedStringFieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.NormalizedStringFieldTypeDescriptor) Consumer(java.util.function.Consumer) List(java.util.List) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue) Aggregable(org.hibernate.search.engine.backend.types.Aggregable) StandardIndexFieldTypeOptionsStep(org.hibernate.search.engine.backend.types.dsl.StandardIndexFieldTypeOptionsStep) SearchQuery(org.hibernate.search.engine.search.query.SearchQuery) Assume.assumeTrue(org.junit.Assume.assumeTrue) Projectable(org.hibernate.search.engine.backend.types.Projectable) TckConfiguration(org.hibernate.search.integrationtest.backend.tck.testsupport.util.TckConfiguration) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) Test(org.junit.Test) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue)

Example 4 with FieldTypeDescriptor

use of org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor in project hibernate-search by hibernate.

the class FieldSearchSortTypeCheckingAndConversionIT method multiIndex_withMissingFieldIndex_dslConverterEnabled.

@Test
@TestForIssue(jiraKey = "HSEARCH-4173")
public void multiIndex_withMissingFieldIndex_dslConverterEnabled() {
    assumeTrue("This backend doesn't support sorts on a field of type '" + fieldTypeDescriptor + "' that is missing from some of the target indexes.", TckConfiguration.get().getBackendFeatures().supportsFieldSortWhenFieldMissingInSomeTargetIndexes(fieldTypeDescriptor.getJavaType()));
    StubMappingScope scope = mainIndex.createScope(missingFieldIndex);
    SearchQuery<DocumentReference> query;
    String fieldPath = getFieldPath();
    query = matchNonEmptyQuery(f -> f.field(fieldPath).asc().missing().use(getSingleValueForMissingUse(BEFORE_DOCUMENT_1_ORDINAL)), scope);
    /*
		 * Not testing the ordering of results here because it's not what we are interested in:
		 * we just want to check that fields are correctly detected as compatible,
		 * that no exception is thrown and that the query is correctly executed on all indexes
		 * with no silent error (HSEARCH-4173).
		 */
    assertThatQuery(query).hasDocRefHitsAnyOrder(b -> {
        b.doc(missingFieldIndex.typeName(), MISSING_FIELD_INDEX_DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_2);
        b.doc(mainIndex.typeName(), DOCUMENT_3);
    });
}
Also used : SearchException(org.hibernate.search.util.common.SearchException) SimpleFieldModelsByType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModelsByType) IndexObjectFieldReference(org.hibernate.search.engine.backend.document.IndexObjectFieldReference) BeforeClass(org.junit.BeforeClass) SimpleFieldModel(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModel) Searchable(org.hibernate.search.engine.backend.types.Searchable) RunWith(org.junit.runner.RunWith) SortFinalStep(org.hibernate.search.engine.search.sort.dsl.SortFinalStep) SearchSetupHelper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.rule.SearchSetupHelper) SearchResultAssert.assertThatQuery(org.hibernate.search.util.impl.integrationtest.common.assertion.SearchResultAssert.assertThatQuery) SearchSortFactory(org.hibernate.search.engine.search.sort.dsl.SearchSortFactory) Function(java.util.function.Function) ObjectStructure(org.hibernate.search.engine.backend.types.ObjectStructure) ArrayList(java.util.ArrayList) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) BulkIndexer(org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer) Locale(java.util.Locale) SimpleMappedIndex(org.hibernate.search.util.impl.integrationtest.mapper.stub.SimpleMappedIndex) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) ValueConvert(org.hibernate.search.engine.search.common.ValueConvert) FailureReportUtils(org.hibernate.search.util.impl.integrationtest.common.FailureReportUtils) ClassRule(org.junit.ClassRule) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) DocumentElement(org.hibernate.search.engine.backend.document.DocumentElement) Parameterized(org.junit.runners.Parameterized) ValueWrapper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.ValueWrapper) FieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor) Sortable(org.hibernate.search.engine.backend.types.Sortable) EventContexts(org.hibernate.search.engine.reporting.spi.EventContexts) Test(org.junit.Test) IndexSchemaElement(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaElement) IndexSchemaObjectField(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaObjectField) InvalidType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.InvalidType) NormalizedStringFieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.NormalizedStringFieldTypeDescriptor) Consumer(java.util.function.Consumer) List(java.util.List) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue) Aggregable(org.hibernate.search.engine.backend.types.Aggregable) StandardIndexFieldTypeOptionsStep(org.hibernate.search.engine.backend.types.dsl.StandardIndexFieldTypeOptionsStep) SearchQuery(org.hibernate.search.engine.search.query.SearchQuery) Assume.assumeTrue(org.junit.Assume.assumeTrue) Projectable(org.hibernate.search.engine.backend.types.Projectable) TckConfiguration(org.hibernate.search.integrationtest.backend.tck.testsupport.util.TckConfiguration) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) Test(org.junit.Test) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue)

Example 5 with FieldTypeDescriptor

use of org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor in project hibernate-search by hibernate.

the class FieldSortTypeCheckingAndConversionIT method multiIndex_withMissingFieldIndex_dslConverterDisabled.

@Test
@TestForIssue(jiraKey = "HSEARCH-4173")
public void multiIndex_withMissingFieldIndex_dslConverterDisabled() {
    assumeTrue("This backend doesn't support sorts on a field of type '" + fieldTypeDescriptor + "' that is missing from some of the target indexes.", TckConfiguration.get().getBackendFeatures().supportsFieldSortWhenFieldMissingInSomeTargetIndexes(fieldTypeDescriptor.getJavaType()));
    StubMappingScope scope = mainIndex.createScope(missingFieldIndex);
    SearchQuery<DocumentReference> query;
    String fieldPath = getFieldPath();
    query = matchNonEmptyQuery(f -> f.field(fieldPath).asc().missing().use(getSingleValueForMissingUse(BEFORE_DOCUMENT_1_ORDINAL), ValueConvert.NO), scope);
    /*
		 * Not testing the ordering of results here because it's not what we are interested in:
		 * we just want to check that fields are correctly detected as compatible,
		 * that no exception is thrown and that the query is correctly executed on all indexes
		 * with no silent error (HSEARCH-4173).
		 */
    assertThatQuery(query).hasDocRefHitsAnyOrder(b -> {
        b.doc(missingFieldIndex.typeName(), MISSING_FIELD_INDEX_DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_1);
        b.doc(mainIndex.typeName(), DOCUMENT_2);
        b.doc(mainIndex.typeName(), DOCUMENT_3);
    });
}
Also used : SearchException(org.hibernate.search.util.common.SearchException) SimpleFieldModelsByType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModelsByType) IndexObjectFieldReference(org.hibernate.search.engine.backend.document.IndexObjectFieldReference) BeforeClass(org.junit.BeforeClass) SimpleFieldModel(org.hibernate.search.integrationtest.backend.tck.testsupport.util.SimpleFieldModel) Searchable(org.hibernate.search.engine.backend.types.Searchable) RunWith(org.junit.runner.RunWith) SortFinalStep(org.hibernate.search.engine.search.sort.dsl.SortFinalStep) SearchSetupHelper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.rule.SearchSetupHelper) SearchResultAssert.assertThatQuery(org.hibernate.search.util.impl.integrationtest.common.assertion.SearchResultAssert.assertThatQuery) SearchSortFactory(org.hibernate.search.engine.search.sort.dsl.SearchSortFactory) Function(java.util.function.Function) ObjectStructure(org.hibernate.search.engine.backend.types.ObjectStructure) ArrayList(java.util.ArrayList) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) BulkIndexer(org.hibernate.search.util.impl.integrationtest.mapper.stub.BulkIndexer) Locale(java.util.Locale) SimpleMappedIndex(org.hibernate.search.util.impl.integrationtest.mapper.stub.SimpleMappedIndex) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) ValueConvert(org.hibernate.search.engine.search.common.ValueConvert) FailureReportUtils(org.hibernate.search.util.impl.integrationtest.common.reporting.FailureReportUtils) ClassRule(org.junit.ClassRule) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) DocumentElement(org.hibernate.search.engine.backend.document.DocumentElement) Parameterized(org.junit.runners.Parameterized) ValueWrapper(org.hibernate.search.integrationtest.backend.tck.testsupport.util.ValueWrapper) FieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.FieldTypeDescriptor) Sortable(org.hibernate.search.engine.backend.types.Sortable) EventContexts(org.hibernate.search.engine.reporting.spi.EventContexts) Test(org.junit.Test) IndexSchemaElement(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaElement) IndexSchemaObjectField(org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaObjectField) InvalidType(org.hibernate.search.integrationtest.backend.tck.testsupport.util.InvalidType) NormalizedStringFieldTypeDescriptor(org.hibernate.search.integrationtest.backend.tck.testsupport.types.NormalizedStringFieldTypeDescriptor) Consumer(java.util.function.Consumer) List(java.util.List) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue) Aggregable(org.hibernate.search.engine.backend.types.Aggregable) StandardIndexFieldTypeOptionsStep(org.hibernate.search.engine.backend.types.dsl.StandardIndexFieldTypeOptionsStep) SearchQuery(org.hibernate.search.engine.search.query.SearchQuery) Assume.assumeTrue(org.junit.Assume.assumeTrue) Projectable(org.hibernate.search.engine.backend.types.Projectable) TckConfiguration(org.hibernate.search.integrationtest.backend.tck.testsupport.util.TckConfiguration) StubMappingScope(org.hibernate.search.util.impl.integrationtest.mapper.stub.StubMappingScope) DocumentReference(org.hibernate.search.engine.backend.common.DocumentReference) Test(org.junit.Test) TestForIssue(org.hibernate.search.util.impl.test.annotation.TestForIssue)

Aggregations

ArrayList (java.util.ArrayList)6 List (java.util.List)6 Locale (java.util.Locale)6 Consumer (java.util.function.Consumer)6 Function (java.util.function.Function)6 Assertions.assertThatThrownBy (org.assertj.core.api.Assertions.assertThatThrownBy)6 DocumentReference (org.hibernate.search.engine.backend.common.DocumentReference)6 DocumentElement (org.hibernate.search.engine.backend.document.DocumentElement)6 IndexObjectFieldReference (org.hibernate.search.engine.backend.document.IndexObjectFieldReference)6 IndexSchemaElement (org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaElement)6 IndexSchemaObjectField (org.hibernate.search.engine.backend.document.model.dsl.IndexSchemaObjectField)6 Aggregable (org.hibernate.search.engine.backend.types.Aggregable)6 ObjectStructure (org.hibernate.search.engine.backend.types.ObjectStructure)6 Projectable (org.hibernate.search.engine.backend.types.Projectable)6 Searchable (org.hibernate.search.engine.backend.types.Searchable)6 Sortable (org.hibernate.search.engine.backend.types.Sortable)6 StandardIndexFieldTypeOptionsStep (org.hibernate.search.engine.backend.types.dsl.StandardIndexFieldTypeOptionsStep)6 EventContexts (org.hibernate.search.engine.reporting.spi.EventContexts)6 ValueConvert (org.hibernate.search.engine.search.common.ValueConvert)6 SearchQuery (org.hibernate.search.engine.search.query.SearchQuery)6