Apply the changes to the index
779167
def commit(self, index_update=True, label_guesser_update=True):
        
        logger.info("Index: Commiting changes")
        if self.index_writer:
            if index_update:
                self.index_writer.commit()
            else:
                self.index_writer.cancel()
            del self.index_writer
        self.index_writer = None

        self.index.refresh()

        if self.label_guesser:
            if label_guesser_update and self.label_guesser_updater is not None:
                self.label_guesser_updater.commit()
            if index_update:
                self.reload_searcher()
1093340
function handleFocusIndexChange (newIndex, oldIndex) {
    if (newIndex === oldIndex) return;
    if (!getElements().tabs[ newIndex ]) return;
    adjustOffset();
    redirectFocus();
  }
399412
def _updateColumnValues(self, index, hidden):
        
        if hidden or not self.isVisible():
            return
        
        column = self.columnOf(index)
        if not column in self._loadedColumns:
            self._loadedColumns.add(column)
            
            records = self.collectRecords()
            self.loadColumnsRequested.emit(records, column)
1150906
def update_index(entries):
    
    context = GLOBAL_TEMPLATE_CONTEXT.copy()
    context['entries'] = entries
    context['last_build'] = datetime.datetime.now().strftime(
        "%Y-%m-%dT%H:%M:%SZ")

    list(map(lambda x: _render(context, x[0],
                               os.path.join(CONFIG['output_to'], x[1])),
             (('entry_index.html', 'index.html'), ('atom.xml', 'atom.xml'))))
948683
def mutate(self):
        '''
        
        '''
        self._initialize()
        if self._exhausted():
            return False
        self._current_index += 1
        self._mutate()
        return True
74959
def done(self, index):
        
        if self.model.exists(index):
            self.model.edit(index, done=True)
1318197
def set_index(self, index):
        
        for df in self.get_DataFrame(data=True, with_population=False):
            df.index = index
15173
def addIndex(self, index):
        
        index.setSchema(self)
        self.__indexes[index.name()] = index
396060
def update_index(index):
    """"""
    logger.info("Updating search index: '%s'", index)
    client = get_client()
    responses = []
    for model in get_index_models(index):
        logger.info("Updating search index model: '%s'", model.search_doc_type)
        objects = model.objects.get_search_queryset(index).iterator()
        actions = bulk_actions(objects, index=index, action="index")
        response = helpers.bulk(client, actions, chunk_size=get_setting("chunk_size"))
        responses.append(response)
    return responses
246345
def reset_index(self):
        
        self.index = list(range(self.__len__()))
        self.index_name = 'index'
1255315
def setCurrentIndex(self, index):
        
        if self._currentIndex == index:
            return

        self._currentIndex = index
        self.currentIndexChanged.emit(index)

        for i, item in enumerate(self.items()):
            item.setMenuEnabled(i == index)
        self.repaint()
335952
public void updateIndex(ChangesHolder changes, ChangesHolder parentChanges)
   {
      // pass lists to search manager 
      if (searchManager != null && changes != null)
      {
         try
         {
            searchManager.apply(changes);
         }
         catch (RepositoryException e)
         {
            log.error("Error indexing changes " + e, e);
         }
         catch (IOException e)
         {
            log.error("Error indexing changes " + e, e);
            try
            {
               handler.logErrorChanges(new HashSet<String>(changes.getRemove()), new HashSet<String>(changes
                  .getAddIds()));
            }
            catch (IOException ioe)
            {
               log.warn("Exception occure when errorLog writed. Error log is not complete. " + ioe, ioe);
            }
         }
      }
      // pass lists to parent search manager 
      if (parentSearchManager != null && parentChanges != null)
      {
         try
         {
            parentSearchManager.apply(parentChanges);
         }
         catch (RepositoryException e)
         {
            log.error("Error indexing changes " + e, e);
         }
         catch (IOException e)
         {
            log.error("Error indexing changes " + e, e);
            try
            {
               parentHandler.logErrorChanges(new HashSet<String>(parentChanges.getRemove()), new HashSet<String>(
                  parentChanges.getAddIds()));
            }
            catch (IOException ioe)
            {
               log.warn("Exception occure when errorLog writed. Error log is not complete. " + ioe, ioe);
            }
         }
      }
   }
33221
def index(self, index):
        
        if self._index != index:
            self._dirty = True
        self._index = index
142504
public function apply()
    {
        $input = $this->grid->getInputProcessor()->getInput();
        $sort = null;
        if (isset($input['sort'])) {
            foreach ($input['sort'] as $field => $direction) {
                $sort = [$field, $direction];
                break;
            }
        }
        foreach ($this->grid->getConfig()->getColumns() as $column) {
            if ($sort) {
                if ($column->getName() === $sort[0]) {
                    $column->setSorting($sort[1]);
                } else {
                    $column->setSorting(null);
                }
            } else {
                if ($direction = $column->getSorting()) {
                    $sort = [$column->getName(), $direction];
                }
            }
        }
        if ($sort) {
            $this
                ->grid
                ->getConfig()
                ->getDataProvider()
                ->orderBy($sort[0], $sort[1]);
        }
    }
1203104
def push(self, index=None):
        
        for ind in self.indexes:
            if index and not isinstance(ind, index):
                continue
            ind.push()
509065
def undone(self, index):
        
        if self.model.exists(index):
            self.model.edit(index, done=False)
241604
protected function resetIndex()
    {
        $index = $this->getIndexSchema();
        $this->db->createCommand()->truncateIndex($index->name)->execute();
    }