def teardown_indexes(self): es = get_indexing_es() try: es.delete_index(get_index()) except ElasticHttpNotFoundError: # If we get this error, it means the index didn't exist # so there's nothing to delete. pass
def refresh(self, timesleep=0): index = get_index() # Any time we're doing a refresh, we're making sure that the # index is ready to be queried. Given that, it's almost # always the case that we want to run all the generated tasks, # then refresh. get_indexing_es().refresh(index) if timesleep > 0: time.sleep(timesleep)
def refresh(self, timesleep=0): index = get_index() # Any time we're doing a refresh, we're making sure that the # index is ready to be queried. Given that, it's almost # always the case that we want to run all the generated tasks, # then refresh. get_indexing_es().indices.refresh(index=index) if timesleep > 0: time.sleep(timesleep)
def refresh(self, timesleep=0): index = get_index() # Any time we're doing a refresh, we're making sure that the # index is ready to be queried. Given that, it's almost # always the case that we want to run all the generated tasks, # then refresh. # TODO: uncomment this when we have live indexing. # generate_tasks() get_indexing_es().refresh(index) if timesleep > 0: time.sleep(timesleep)