use of org.springframework.data.elasticsearch.core.IndexOperations in project spring-data-elasticsearch by spring-projects.
the class ElasticsearchOperationsCallbackIntegrationTests method setUp.
@BeforeEach
void setUp() {
seqNoPrimaryTerm = null;
operations = (AbstractElasticsearchTemplate) spy(originalOperations);
IndexOperations indexOps = operations.indexOps(SampleEntity.class);
indexOps.delete();
indexOps.create();
indexOps.putMapping(SampleEntity.class);
// store one entity to have a seq_no and primary_term
final SampleEntity initial = new SampleEntity("1", "initial");
final SampleEntity saved = operations.save(initial);
seqNoPrimaryTerm = saved.getSeqNoPrimaryTerm();
}
use of org.springframework.data.elasticsearch.core.IndexOperations in project spring-data-elasticsearch by spring-projects.
the class ReactiveElasticsearchOperationsCallbackTest method tearDown.
@AfterEach
void tearDown() {
IndexOperations indexOps = nonreactiveOperations.indexOps(SampleEntity.class);
indexOps.delete();
}
use of org.springframework.data.elasticsearch.core.IndexOperations in project spring-data-elasticsearch by spring-projects.
the class ReactiveElasticsearchOperationsCallbackTest method setUp.
@BeforeEach
void setUp() {
IndexOperations indexOps = nonreactiveOperations.indexOps(SampleEntity.class);
indexOps.create();
indexOps.putMapping(SampleEntity.class);
}
use of org.springframework.data.elasticsearch.core.IndexOperations in project spring-data-elasticsearch by spring-projects.
the class MappingBuilderIntegrationTests method shouldNotFailOnCircularReference.
@Test
public void shouldNotFailOnCircularReference() {
IndexOperations indexOperations = operations.indexOps(SimpleRecursiveEntity.class);
indexOperations.createWithMapping();
indexOperations.refresh();
}
use of org.springframework.data.elasticsearch.core.IndexOperations in project spring-data-elasticsearch by spring-projects.
the class MappingBuilderIntegrationTests method shouldWriteDynamicMapping.
// #1871
@Test
@DisplayName("should write dynamic mapping")
void shouldWriteDynamicMapping() {
IndexOperations indexOps = operations.indexOps(DynamicMappingEntity.class);
indexOps.create();
indexOps.putMapping();
}
Aggregations