public interface ElasticService
Modifier and Type | Interface and Description |
---|---|
static class |
ElasticService.IDENTIFIER |
Modifier and Type | Field and Description |
---|---|
static String |
INDEX_AKDOC |
static String |
INDEX_AKSUPPORT |
static String |
SERVICE_ID |
Modifier and Type | Method and Description |
---|---|
ElasticState |
checkConnection()
Vérifie la connexion à un moteur ES
|
Long |
countDocuments(String index) |
long |
countQueryType(String type)
Compte le nombre de document dans l'index ayant le type type
|
void |
createIndex(String indexName,
boolean isIndexUsedForFiles)
Créé un index sur un noeud ElasticSearch
|
void |
deleteFromIndex(String id,
String index,
String type)
Supprime un élément de l'index
|
void |
deleteIndex(String indexName) |
String |
getElasticHQUrl()
Retourne l'url du plugin HQ sur le serveur elasticSearch
|
void |
index(List<Object> objects,
String[] aliases,
String type)
Index un ensemble d'objet
|
void |
index(List<Object> objects,
String[] aliases,
String index,
String type)
Index un ensemble d'objet
|
Long |
indexAkuiteoDocuments()
Indexe les documents Akuiteo
|
long |
indexFiles(String nomIndex,
ElasticService.IDENTIFIER identifier,
List<File> files)
Indexe massivement une liste de fichiers
|
boolean |
isConnected()
Test la connexion au service
|
void |
reindexSourceExterieure(List<CtxESSourceExt> datasources) |
ESResult |
search(String text)
Effectue une recherche
|
ESResult |
search(String text,
String indice)
Effectue une recherche
|
ESResult |
searchAkuiteoObjectsAndDocuments(String text,
Set<String> facets,
int maxNumberOfResults)
Effectue une recherche par facettes
|
ESResult |
searchByFacet(String text,
String facet,
int maxNumberOfResults)
Effectue une recherche par facette
|
ESResult |
searchByFacets(String text,
Set<String> facets,
int numberOfRetrievedResults) |
ESResult |
searchByFacets(String text,
Set<String> facets,
String indice,
int maxNumberOfResults)
Effectue une recherche par facettes
|
void |
searchingSeekAndDestroy()
Détruit tous les index et reconstruit la base elastic search
|
void |
wipeAndReindex()
Détruite les index sur le serveur ES et fait une demande de rebuild des index
|
static final String SERVICE_ID
static final String INDEX_AKSUPPORT
static final String INDEX_AKDOC
ElasticState checkConnection()
void index(List<Object> objects, String[] aliases, String type)
objects
- void index(List<Object> objects, String[] aliases, String index, String type)
objects
- void deleteFromIndex(String id, String index, String type)
id
- index
- type
- ESResult search(String text, String indice)
text
- ESResult searchByFacet(String text, String facet, int maxNumberOfResults)
ESResult searchByFacets(String text, Set<String> facets, String indice, int maxNumberOfResults)
ESResult searchAkuiteoObjectsAndDocuments(String text, Set<String> facets, int maxNumberOfResults)
String getElasticHQUrl()
long countQueryType(String type)
type
- boolean isConnected()
void searchingSeekAndDestroy()
void createIndex(String indexName, boolean isIndexUsedForFiles)
indexName
- nom de l'indexisIndexUsedForFiles
- si true, l'index sert à stocker des fichiersvoid deleteIndex(String indexName)
indexName
- nom de l'index à supprimerlong indexFiles(String nomIndex, ElasticService.IDENTIFIER identifier, List<File> files)
nomIndex
- nom de l'indexidentifier
- indique le champ utilisé comme identifiant (nom du fichier ou chemin complet)files
- fichiers à stockerIOException
ESResult searchByFacets(String text, Set<String> facets, int numberOfRetrievedResults)
text
- facets
- numberOfRetrievedResults
- Long indexAkuiteoDocuments() throws Exception
Exception
- en cas de problèmesLong countDocuments(String index)
index
- index
void reindexSourceExterieure(List<CtxESSourceExt> datasources)
datasources
- void wipeAndReindex()
datasources
- Copyright © 2016. All rights reserved.