Class ElasticsearchAccessFunctionalAdmin
java.lang.Object
fr.gouv.vitam.common.database.server.elasticsearch.ElasticsearchAccess
fr.gouv.vitam.functional.administration.common.server.ElasticsearchAccessFunctionalAdmin
- All Implemented Interfaces:
DatabaseConnection
ElasticSearch model with MongoDB as main database
-
Field Summary
Fields inherited from class fr.gouv.vitam.common.database.server.elasticsearch.ElasticsearchAccess
clusterName, DEFAULT_LIMIT_SCROLL, DEFAULT_SCROLL_TIMEOUT, nodes, SCROLL_ACTIVATE_KEYWORD
-
Constructor Summary
ConstructorDescriptionElasticsearchAccessFunctionalAdmin
(String clusterName, List<ElasticsearchNode> nodes, ElasticsearchFunctionalAdminIndexManager indexManager) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addIndex
(FunctionalAdminCollections collection) Add a type to an indexstatic void
Methods adding Indexesprotected final co.elastic.clients.elasticsearch.core.search.ResponseBody<com.fasterxml.jackson.databind.node.ObjectNode>
search
(FunctionalAdminCollections collection, co.elastic.clients.elasticsearch._types.query_dsl.Query query) Methods inherited from class fr.gouv.vitam.common.database.server.elasticsearch.ElasticsearchAccess
checkConnection, clearScroll, close, createIndexAndAliasIfAliasNotExists, createIndexWithoutAlias, delete, deleteIndexByAliasForTesting, deleteIndexForTesting, existsAlias, existsIndex, getAlias, getClient, getClusterName, getInfo, getNodes, indexEntries, indexEntry, purgeIndexForTesting, purgeIndexForTesting, refreshIndex, search, search, searchCrossIndices, switchIndex, updateEntry
-
Constructor Details
-
ElasticsearchAccessFunctionalAdmin
public ElasticsearchAccessFunctionalAdmin(String clusterName, List<ElasticsearchNode> nodes, ElasticsearchFunctionalAdminIndexManager indexManager) throws VitamException - Parameters:
clusterName
-nodes
-indexManager
-- Throws:
VitamException
-
-
Method Details
-
addIndex
Add a type to an index- Parameters:
collection
-- Throws:
ReferentialException
-
search
protected final co.elastic.clients.elasticsearch.core.search.ResponseBody<com.fasterxml.jackson.databind.node.ObjectNode> search(FunctionalAdminCollections collection, co.elastic.clients.elasticsearch._types.query_dsl.Query query) throws ReferentialException, BadRequestException - Parameters:
collection
-query
- as in DSL mode "{ "fieldname" : "value" }" "{ "match" : { "fieldname" : "value" } }" "{ "ids" : { " values" : [list of id] } }"- Returns:
- a structure as ResultInterface
- Throws:
ReferentialException
BadRequestException
-
ensureIndex
public static void ensureIndex()Methods adding Indexes
-