Ejemplo n.º 1
0
 def init_metadata(self):
     if not TestWrapper.INIT:
         # This is necessary as I added an analyzer with a keyword tokenizer
         # which requires an index to be closed and reopened.
         self.connection.indices.delete(index=self.index, ignore=404)
         Metadata.init(index=self.index, using=self.connection)
         self.connection.indices.refresh(index=self.index)
         TestWrapper.INIT = True
Ejemplo n.º 2
0
    def initialize(self):
        config = self.read_config()
        connection = Connection(config["connectionString"],
                                config.get("accessKey"),
                                config.get("secretKey"), config.get("region"))

        index_exists = connection.indices.exists(index=connection.es_index)

        if not index_exists:
            Metadata.init(using=connection, index=connection.es_index)

        connection.indices.refresh(index=connection.es_index)
Ejemplo n.º 3
0
    def initialize(self):
        config = self.read_config()
        connection = Connection(config["connectionString"],
                                config.get("accessKey"),
                                config.get("secretKey"),
                                config.get("region"))

        index_exists = connection.indices.exists(index=connection.es_index)

        if not index_exists:
            Metadata.init(using=connection, index=connection.es_index)

        connection.indices.refresh(index=connection.es_index)