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
public class ElasticsearchAccessFunctionalAdmin extends ElasticsearchAccess
ElasticSearch model with MongoDB as main database
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMAPPING_ACCESSCONTRACT_FILEstatic java.lang.StringMAPPING_ACCESSION_REGISTER_DETAIL_FILEstatic java.lang.StringMAPPING_ACCESSION_REGISTER_SUMMARY_FILEstatic java.lang.StringMAPPING_ACCESSION_REGISTER_SYMBOLICS_FILEstatic java.lang.StringMAPPING_AGENCIES_FILEstatic java.lang.StringMAPPING_ARCHIVE_UNIT_PROFILE_FILEstatic java.lang.StringMAPPING_CONTEXT_FILEstatic java.lang.StringMAPPING_FORMAT_FILEstatic java.lang.StringMAPPING_GRIFFIN_FILEstatic java.lang.StringMAPPING_INGESTCONTRACT_FILEstatic java.lang.StringMAPPING_MANAGEMENTCONTRACT_FILEstatic java.lang.StringMAPPING_ONTOLOGY_FILEstatic java.lang.StringMAPPING_PRESERVATION_SCENARIO_FILEstatic java.lang.StringMAPPING_PROFILE_FILEstatic java.lang.StringMAPPING_RULE_FILEstatic java.lang.StringMAPPING_SECURITY_PROFILE_FILE-
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
Constructors Constructor Description ElasticsearchAccessFunctionalAdmin(java.lang.String clusterName, java.util.List<ElasticsearchNode> nodes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>addIndex(FunctionalAdminCollections collection)Add a type to an indexstatic voidensureIndex()Methods adding Indexesprotected org.elasticsearch.action.search.SearchResponsesearch(FunctionalAdminCollections collection, org.elasticsearch.index.query.QueryBuilder query, org.elasticsearch.index.query.QueryBuilder filter)-
Methods inherited from class fr.gouv.vitam.common.database.server.elasticsearch.ElasticsearchAccess
checkConnection, clearScroll, close, createIndex, createIndex, createIndexAndAliasIfAliasNotExists, createIndexAndAliasIfAliasNotExists, createIndexWithoutAlias, delete, deleteIndex, deleteIndexByAlias, existsAlias, existsIndex, getAlias, getClient, getClusterName, getInfo, getNodes, indexEntries, indexEntry, purgeIndex, purgeIndex, refreshIndex, search, search, search, search, switchAliasIndex, switchIndex, updateEntry
-
-
-
-
Field Detail
-
MAPPING_FORMAT_FILE
public static final java.lang.String MAPPING_FORMAT_FILE
- See Also:
- Constant Field Values
-
MAPPING_RULE_FILE
public static final java.lang.String MAPPING_RULE_FILE
- See Also:
- Constant Field Values
-
MAPPING_INGESTCONTRACT_FILE
public static final java.lang.String MAPPING_INGESTCONTRACT_FILE
- See Also:
- Constant Field Values
-
MAPPING_ACCESSCONTRACT_FILE
public static final java.lang.String MAPPING_ACCESSCONTRACT_FILE
- See Also:
- Constant Field Values
-
MAPPING_MANAGEMENTCONTRACT_FILE
public static final java.lang.String MAPPING_MANAGEMENTCONTRACT_FILE
- See Also:
- Constant Field Values
-
MAPPING_AGENCIES_FILE
public static final java.lang.String MAPPING_AGENCIES_FILE
- See Also:
- Constant Field Values
-
MAPPING_PROFILE_FILE
public static final java.lang.String MAPPING_PROFILE_FILE
- See Also:
- Constant Field Values
-
MAPPING_CONTEXT_FILE
public static final java.lang.String MAPPING_CONTEXT_FILE
- See Also:
- Constant Field Values
-
MAPPING_SECURITY_PROFILE_FILE
public static final java.lang.String MAPPING_SECURITY_PROFILE_FILE
- See Also:
- Constant Field Values
-
MAPPING_ARCHIVE_UNIT_PROFILE_FILE
public static final java.lang.String MAPPING_ARCHIVE_UNIT_PROFILE_FILE
- See Also:
- Constant Field Values
-
MAPPING_ONTOLOGY_FILE
public static final java.lang.String MAPPING_ONTOLOGY_FILE
- See Also:
- Constant Field Values
-
MAPPING_ACCESSION_REGISTER_SYMBOLICS_FILE
public static final java.lang.String MAPPING_ACCESSION_REGISTER_SYMBOLICS_FILE
- See Also:
- Constant Field Values
-
MAPPING_ACCESSION_REGISTER_SUMMARY_FILE
public static final java.lang.String MAPPING_ACCESSION_REGISTER_SUMMARY_FILE
- See Also:
- Constant Field Values
-
MAPPING_ACCESSION_REGISTER_DETAIL_FILE
public static final java.lang.String MAPPING_ACCESSION_REGISTER_DETAIL_FILE
- See Also:
- Constant Field Values
-
MAPPING_GRIFFIN_FILE
public static final java.lang.String MAPPING_GRIFFIN_FILE
- See Also:
- Constant Field Values
-
MAPPING_PRESERVATION_SCENARIO_FILE
public static final java.lang.String MAPPING_PRESERVATION_SCENARIO_FILE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ElasticsearchAccessFunctionalAdmin
public ElasticsearchAccessFunctionalAdmin(java.lang.String clusterName, java.util.List<ElasticsearchNode> nodes) throws VitamException, java.io.IOException- Parameters:
clusterName-nodes-- Throws:
VitamExceptionjava.io.IOException
-
-
Method Detail
-
addIndex
public final java.util.Map<java.lang.String,java.lang.String> addIndex(FunctionalAdminCollections collection)
Add a type to an index- Parameters:
collection-- Returns:
- key aliasName value indexName or empty
-
search
protected final org.elasticsearch.action.search.SearchResponse search(FunctionalAdminCollections collection, org.elasticsearch.index.query.QueryBuilder query, org.elasticsearch.index.query.QueryBuilder filter) throws ReferentialException, BadRequestException
- Parameters:
collection-query- as in DSL mode "{ "fieldname" : "value" }" "{ "match" : { "fieldname" : "value" } }" "{ "ids" : { " values" : [list of id] } }"filter-- Returns:
- a structure as ResultInterface
- Throws:
ReferentialExceptionBadRequestException
-
ensureIndex
public static void ensureIndex()
Methods adding Indexes
-
-