Class ElasticsearchDb

    • Nested Class Summary

      • Nested classes/interfaces inherited from class io.inversion.Rule

        io.inversion.Rule.RuleMatcher
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int[] allowedFailResponseCodes  
      java.lang.String defaultSource  
      int maxElasticQuerySize  
      protected int maxRequestDuration  
      protected java.lang.String url  
      • Fields inherited from class io.inversion.Db

        bootstrap, collections, dryRun, excludeColumns, includeColumns, includeTables, log, reservedParams, type
      • Fields inherited from class io.inversion.Rule

        ALL_METHODS, configMap, description, excludeMatchers, excludeOn, includeMatchers, includeOn, name, order, params
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected io.inversion.Collection buildCollection​(java.lang.String tableName)  
      void configDb()  
      protected void deleteRow​(io.inversion.Collection collection, java.util.Map<java.lang.String,​java.lang.Object> indexValues)
      Deletes a single specific resource.
      void doDelete​(io.inversion.Collection table, java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> indexValues)  
      io.inversion.Results<io.inversion.utils.Rows.Row> doSelect​(io.inversion.Collection table, java.util.List<io.inversion.rql.Term> columnMappedTerms)  
      java.util.List doUpsert​(io.inversion.Collection table, java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> rows)  
      org.elasticsearch.client.RestHighLevelClient getElasticClient()  
      java.lang.String getUrl()  
      java.lang.String upsertRow​(io.inversion.Collection table, java.util.Map<java.lang.String,​java.lang.Object> columnMappedTermsRow)  
      ElasticsearchDb withUrl​(java.lang.String url)  
      • Methods inherited from class io.inversion.Db

        beautifyCollectionName, beautifyName, buildCollections, buildRelationships, castDbOutput, castJsonInput, castJsonInput, configApi, delete, doPatch, doShutdown, doShutdown, doStartup, excludeTable, filterOutJsonProperty, getCollection, getCollectionByTableName, getCollections, getProperty, getType, isBootstrap, isDryRun, isRunning, isType, makeRelationshipName, mapToColumnNames, mapToColumnNames, mapToJsonNames, patch, removeCollection, select, shutdown, shutdown, startup, upsert, withBootstrap, withCollection, withCollections, withDryRun, withExcludeColumns, withIncludeColumns, withIncludeTable, withIncludeTables, withType
      • Methods inherited from class io.inversion.Rule

        afterWiringComplete, checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludeMethods, getAllIncludePaths, getDefaultIncludeMatchers, getDescription, getExcludeMatchers, getIncludeMatchers, getName, getOrder, getParams, match, match, matches, matches, toString, withDescription, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withName, withOrder, withParam, withParams
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • defaultSource

        public final java.lang.String defaultSource
      • allowedFailResponseCodes

        protected final int[] allowedFailResponseCodes
      • maxElasticQuerySize

        public int maxElasticQuerySize
      • url

        protected java.lang.String url
    • Constructor Detail

      • ElasticsearchDb

        public ElasticsearchDb()
      • ElasticsearchDb

        public ElasticsearchDb​(java.lang.String elasticUrl)
      • ElasticsearchDb

        public ElasticsearchDb​(java.lang.String name,
                               java.lang.String url)
    • Method Detail

      • getElasticClient

        public org.elasticsearch.client.RestHighLevelClient getElasticClient()
      • doSelect

        public io.inversion.Results<io.inversion.utils.Rows.Row> doSelect​(io.inversion.Collection table,
                                                                          java.util.List<io.inversion.rql.Term> columnMappedTerms)
                                                                   throws io.inversion.ApiException
        Overrides:
        doSelect in class io.inversion.Db<ElasticsearchDb>
        Throws:
        io.inversion.ApiException
      • doDelete

        public void doDelete​(io.inversion.Collection table,
                             java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> indexValues)
                      throws io.inversion.ApiException
        Overrides:
        doDelete in class io.inversion.Db<ElasticsearchDb>
        Throws:
        io.inversion.ApiException
      • deleteRow

        protected void deleteRow​(io.inversion.Collection collection,
                                 java.util.Map<java.lang.String,​java.lang.Object> indexValues)
                          throws io.inversion.ApiException
        Deletes a single specific resource.
        Parameters:
        collection - the collection to delete from
        indexValues - identifiers for the records to delete
        Throws:
        io.inversion.ApiException
      • doUpsert

        public java.util.List doUpsert​(io.inversion.Collection table,
                                       java.util.List<java.util.Map<java.lang.String,​java.lang.Object>> rows)
                                throws io.inversion.ApiException
        Overrides:
        doUpsert in class io.inversion.Db<ElasticsearchDb>
        Throws:
        io.inversion.ApiException
      • upsertRow

        public java.lang.String upsertRow​(io.inversion.Collection table,
                                          java.util.Map<java.lang.String,​java.lang.Object> columnMappedTermsRow)
                                   throws io.inversion.ApiException
        Throws:
        io.inversion.ApiException
      • configDb

        public void configDb()
                      throws io.inversion.ApiException
        Overrides:
        configDb in class io.inversion.Db<ElasticsearchDb>
        Throws:
        io.inversion.ApiException
      • buildCollection

        protected io.inversion.Collection buildCollection​(java.lang.String tableName)
      • getUrl

        public java.lang.String getUrl()