use of org.springframework.data.elasticsearch.core.IndexOperations in project spring-data-elasticsearch by spring-projects.
the class ElasticsearchOperationsCallbackIntegrationTests method tearDown.
@AfterEach
void tearDown() {
IndexOperations indexOps = operations.indexOps(SampleEntity.class);
indexOps.delete();
}
use of org.springframework.data.elasticsearch.core.IndexOperations in project mall by macrozheng.
the class MallSearchApplicationTests method testEsProductMapping.
@Test
public void testEsProductMapping() {
IndexOperations indexOperations = elasticsearchTemplate.indexOps(EsProduct.class);
indexOperations.putMapping(indexOperations.createMapping(EsProduct.class));
Map mapping = indexOperations.getMapping();
System.out.println(mapping);
}
use of org.springframework.data.elasticsearch.core.IndexOperations in project mall-swarm by macrozheng.
the class MallSearchApplicationTests method testEsProductMapping.
@Test
public void testEsProductMapping() {
IndexOperations indexOperations = elasticsearchTemplate.indexOps(EsProduct.class);
indexOperations.putMapping(indexOperations.createMapping(EsProduct.class));
Map mapping = indexOperations.getMapping();
System.out.println(mapping);
}
use of org.springframework.data.elasticsearch.core.IndexOperations in project spring-data-elasticsearch by spring-projects.
the class ImmutableElasticsearchRepositoryTests method before.
@BeforeEach
public void before() {
IndexOperations indexOperations = operations.indexOps(ImmutableEntity.class);
indexOperations.delete();
indexOperations.create();
indexOperations.refresh();
}
use of org.springframework.data.elasticsearch.core.IndexOperations in project spring-data-elasticsearch by spring-projects.
the class DynamicIndexEntityIntegrationTests method indexOpsShouldUseDynamicallyProvidedName.
// DATAES-821
@Test
void indexOpsShouldUseDynamicallyProvidedName() {
indexNameProvider.indexName = "index-dynamic";
indexNameProvider.callsCount = 0;
operations.indexOps(IndexCoordinates.of("index-dynamic")).delete();
IndexOperations indexOps = operations.indexOps(DynamicIndexEntity.class);
indexOps.create();
indexOps.refresh();
indexOps.refresh();
// internally calls doExists
indexOps.delete();
assertThat(indexNameProvider.callsCount).isGreaterThan(0);
}
Aggregations