Class LogbookElasticsearchAccess

  • All Implemented Interfaces:
    DatabaseConnection

    public class LogbookElasticsearchAccess
    extends ElasticsearchAccess
    ElasticSearch model with MongoDB as main database with management of index and index entries
    • Field Detail

      • MAPPING_LOGBOOK_OPERATION_FILE

        public static final java.lang.String MAPPING_LOGBOOK_OPERATION_FILE
        See Also:
        Constant Field Values
    • Method Detail

      • createIndexesAndAliases

        public void createIndexesAndAliases()
      • search

        public final org.elasticsearch.action.search.SearchResponse search​(LogbookCollections collection,
                                                                           java.lang.Integer tenantId,
                                                                           org.elasticsearch.index.query.QueryBuilder query,
                                                                           org.elasticsearch.index.query.QueryBuilder filter,
                                                                           java.util.List<org.elasticsearch.search.sort.SortBuilder<?>> sorts,
                                                                           int offset,
                                                                           int limit)
                                                                    throws LogbookException
        Search entries in the ElasticSearch index.
        Parameters:
        collection - collection of index
        tenantId - tenant Id
        query - as in DSL mode "{ "fieldname" : "value" }" "{ "match" : { "fieldname" : "value" } }" "{ "ids" : { " values" : [list of id] } }"
        filter - the filter
        sorts - the list of sort
        offset - the offset
        limit - the limit
        Returns:
        a structure as SearchResponse
        Throws:
        LogbookException - thrown of an error occurred while executing the request
      • searchCrossIndices

        public final org.elasticsearch.action.search.SearchResponse searchCrossIndices​(LogbookCollections collection,
                                                                                       java.lang.Integer tenantId,
                                                                                       org.elasticsearch.index.query.QueryBuilder query,
                                                                                       org.elasticsearch.index.query.QueryBuilder filter,
                                                                                       java.util.List<org.elasticsearch.search.sort.SortBuilder<?>> sorts,
                                                                                       int offset,
                                                                                       int limit)
                                                                                throws LogbookException
        Throws:
        LogbookException