@Component public class ElasticsearchService extends Object implements SearchService, IndexService
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_BATCH_SIZE |
| Constructor and Description |
|---|
ElasticsearchService(ClientFacade clientFacade,
ContentGenerators contentGenerators,
DataService dataService) |
| Modifier and Type | Method and Description |
|---|---|
AggregateResult |
aggregate(EntityType entityType,
AggregateQuery aggregateQuery) |
long |
count(EntityType entityType) |
long |
count(EntityType entityType,
Query<Entity> q) |
void |
createIndex(EntityType entityType) |
void |
delete(EntityType entityType,
Entity entity) |
void |
delete(EntityType entityType,
Stream<? extends Entity> entities) |
void |
deleteAll(EntityType entityType,
Stream<Object> entityIds) |
void |
deleteById(EntityType entityType,
Object entityId) |
void |
deleteIndex(EntityType entityType) |
org.apache.lucene.search.Explanation |
explain(EntityType entityType,
Object entityId,
Query<Entity> q) |
boolean |
hasIndex(EntityType entityType) |
void |
index(EntityType entityType,
Entity entity) |
long |
index(EntityType entityType,
Stream<? extends Entity> entities) |
void |
rebuildIndex(Repository<? extends Entity> repository) |
void |
refreshIndex() |
Stream<Object> |
search(EntityType entityType,
Query<Entity> q) |
Object |
searchOne(EntityType entityType,
Query<Entity> q) |
public static final int MAX_BATCH_SIZE
public ElasticsearchService(ClientFacade clientFacade, ContentGenerators contentGenerators, DataService dataService)
public void createIndex(EntityType entityType)
createIndex in interface IndexServicepublic boolean hasIndex(EntityType entityType)
hasIndex in interface IndexServicepublic void deleteIndex(EntityType entityType)
deleteIndex in interface IndexServicepublic void rebuildIndex(Repository<? extends Entity> repository)
rebuildIndex in interface IndexServicepublic void refreshIndex()
refreshIndex in interface IndexServicepublic long count(EntityType entityType)
count in interface SearchServicepublic long count(EntityType entityType, Query<Entity> q)
count in interface SearchServicepublic Stream<Object> search(EntityType entityType, Query<Entity> q)
search in interface SearchServicepublic Object searchOne(EntityType entityType, Query<Entity> q)
searchOne in interface SearchServicepublic AggregateResult aggregate(EntityType entityType, AggregateQuery aggregateQuery)
aggregate in interface SearchServicepublic org.apache.lucene.search.Explanation explain(EntityType entityType, Object entityId, Query<Entity> q)
public void index(EntityType entityType, Entity entity)
index in interface IndexServicepublic long index(EntityType entityType, Stream<? extends Entity> entities)
index in interface IndexServicepublic void delete(EntityType entityType, Entity entity)
delete in interface IndexServicepublic void deleteById(EntityType entityType, Object entityId)
deleteById in interface IndexServicepublic void deleteAll(EntityType entityType, Stream<Object> entityIds)
deleteAll in interface IndexServicepublic void delete(EntityType entityType, Stream<? extends Entity> entities)
delete in interface IndexServiceCopyright © 2018 Pivotal Software, Inc.. All rights reserved.