Updates the gallery index and triggers a new search afterwards.<p>
180056
public void updateIndex() {

        CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

            @Override
            public void execute() {

                start(200, true);
                getGalleryService().updateIndex(this);
            }

            @Override
            protected void onResponse(Void result) {

                stop(false);
                updateResultsTab(false);
                m_handler.hideShowPreviewButton(true);
            }
        };
        action.execute();
    }
851161
private void update() {
        synchronized (lock) {
            if (!observing) { return; }

            try {
                Log.i(DOMAIN, "%s: Querying...", this);
                final ResultSet oldResultSet = resultSet;
                final ResultSet newResultSet = (oldResultSet == null) ? query.execute() : oldResultSet.refresh();

                willUpdate = false;
                lastUpdatedAt = System.currentTimeMillis();

                if (newResultSet != null) {
                    if (oldResultSet != null) { Log.i(DOMAIN, "%s: Changed!", this); }
                    resultSet = newResultSet;
                    changeNotifier.postChange(new QueryChange(this.query, resultSet, null));
                }
                else {
                    Log.i(DOMAIN, "%s: ...no change", this);
                }
            }
            catch (CouchbaseLiteException e) {
                changeNotifier.postChange(new QueryChange(this.query, null, e));
            }
        }
    }
659038
public void update(CmsClientSitemapEntry source) {

        copyMembers(source);
        // position values < 0 are considered as not set
        if (source.getPosition() >= 0) {
            setPosition(source.getPosition());
        }
    }
970760
public void updateResultsTab(final boolean isNextPage) {

        // if the RPC call will be sent the search object is in a unchanged state
        m_searchObjectChanged = false;
        if (!m_handler.hasResultsTab()) {
            return;
        }
        if (m_searchObject.isEmpty()) {
            // don't search: notify the user that at least one search criteria should be selected
            if ((m_handler.m_galleryDialog.getResultsTab() == null)
                || m_handler.m_galleryDialog.getResultsTab().isSelected()) {
                m_handler.showFirstTab();
            }
        } else {
            // perform the search

            /** The RPC search action for the gallery dialog. */
            CmsRpcAction<CmsGallerySearchBean> searchAction = new CmsRpcAction<CmsGallerySearchBean>() {

                private int m_callId;

                /**
                * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
                */
                @Override
                public void execute() {

                    start(0, true);
                    m_currentCallId++;
                    m_callId = m_currentCallId;
                    m_loading = true;
                    CmsGallerySearchBean preparedObject = prepareSearchObject();

                    if (isNextPage) {
                        preparedObject.setPage(preparedObject.getLastPage() + 1);
                    } else {
                        preparedObject.setPage(1);
                    }
                    getGalleryService().getSearch(preparedObject, this);
                }

                /**
                * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
                */
                @Override
                public void onResponse(CmsGallerySearchBean searchObj) {

                    stop(false);
                    if (m_callId != m_currentCallId) {
                        return;
                    }
                    if (!isNextPage) {
                        m_handler.hideShowPreviewButton(true);
                    }
                    m_loading = false;
                    m_searchObject.setResults(searchObj.getResults());
                    m_searchObject.setResultCount(searchObj.getResultCount());
                    m_searchObject.setSortOrder(searchObj.getSortOrder());
                    m_searchObject.setPage(searchObj.getPage());
                    m_searchObject.setLastPage(searchObj.getLastPage());
                    m_searchObject.setNoUploadReason(searchObj.getNoUploadReason());
                    m_handler.onResultTabSelection(m_searchObject);

                }
            };
            searchAction.execute();
        }
    }
610068
private void doSearch()
    {
        setSearchPanelVisible(true);
        String selectedText = textComponent.getSelectedText();
        if (selectedText != null)
        {
            searchPanel.setQuery(selectedText);
        }
        searchPanel.requestFocusForTextField();
    }
424157
public void updateIndex() {

        if (!isEnabled()) {
            return;
        }

        final IndexWriterConfig indexWriterConfig = new IndexWriterConfig(new StandardAnalyzer());
        indexWriterConfig
                .setCommitOnClose(true)
                .setOpenMode(IndexWriterConfig.OpenMode.CREATE_OR_APPEND);

        try (IndexWriter indexWriter = new IndexWriter(directory, indexWriterConfig)) {
            final List<IPortletDefinition> portlets = portletRegistry.getAllPortletDefinitions();
            portlets.forEach(portlet -> indexPortlet(portlet, indexWriter));
        } catch (Exception e) {
            logger.error("Unable to update index", e);
        }
    }
16623
void update() {
        Application.update(filter, list, main, footer, toggleAll, count, clearCompleted);
    }
1157661
private static void updatePartialIndex(IndexScanPlanNode scan) {
        if (scan.getPredicate() == null && scan.getPartialIndexPredicate() != null) {
            if (scan.isForSortOrderOnly()) {
                scan.setPredicate(Collections.singletonList(scan.getPartialIndexPredicate()));
            }
            scan.setForPartialIndexOnly();
        }
    }
1232808
def _update_search_index(*, instance, index, update_fields):
    """"""
    if not _in_search_queryset(instance=instance, index=index):
        logger.debug(
            "Object (%r) is not in search queryset, ignoring update.", instance
        )
        return

    try:
        if update_fields:
            pre_update.send(
                sender=instance.__class__,
                instance=instance,
                index=index,
                update_fields=update_fields,
            )
            if settings.auto_sync(instance):
                instance.update_search_document(
                    index=index, update_fields=update_fields
                )
        else:
            pre_index.send(sender=instance.__class__, instance=instance, index=index)
            if settings.auto_sync(instance):
                instance.index_search_document(index=index)
    except Exception:
        logger.exception("Error handling 'post_save' signal for %s", instance)
1129861
public void setSearchManager(CmsSearchManager manager) {

        m_searchManager = manager;
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_SEARCH_MANAGER_FINISHED_0));
        }
    }
97036
private void updateSelection() {
        Dateitem selectedItem = getSelectedItem();
        
        if (selectedItem == null) {
            addStyle("color", "gray");
        } else {
            addStyle("color", "inherit");
        }
        
        setFocus(false);
    }
1141491
private Void indexUpdate(Collection<Consumer<Void>> state, Consumer<Void> indexAction) {
        if (async) {
            state.add(indexAction);
        } else {
            indexAction.accept(null);
        }
        return null;
    }
1296549
private void setLastOpenedGallery(CmsGallerySearchBean searchObject) {

        if ((searchObject.getGalleries() != null)
            && (searchObject.getGalleries().size() <= 1) // if the size is 0, the user has actively deselected the galleries, so we want to handle this case too
            && searchObject.haveGalleriesChanged()) {
            String galleryPath = searchObject.getGalleries().isEmpty() ? null : searchObject.getGalleries().get(0);
            CmsWorkplaceSettings settings = getWorkplaceSettings();
            if (searchObject.getGalleryMode() == GalleryMode.adeView) {
                settings.setLastUsedGallery("" + GalleryMode.adeView, galleryPath);
            } else {
                String referencePath = searchObject.getReferencePath();

                String referenceTypeName = "";

                try {
                    CmsObject cms = getCmsObject();
                    CmsResource referenceResource = cms.readResource(referencePath);
                    I_CmsResourceType referenceType = OpenCms.getResourceManager().getResourceType(referenceResource);
                    referenceTypeName = referenceType.getTypeName();
                } catch (CmsException e) {
                    LOG.error(e.getLocalizedMessage(), e);
                }
                settings.setLastUsedGallery(
                    CmsGallerySearchBean.getGalleryStorageKey(
                        searchObject.getGalleryStoragePrefix(),
                        referenceTypeName),
                    galleryPath);
            }
        }
    }
482466
private void applyChangeToGalleryTree(CmsSitemapChangeEvent changeEvent) {

        CmsSitemapChange change = changeEvent.getChange();
        switch (change.getChangeType()) {
            case delete:
                CmsGalleryTreeItem deleteItem = m_galleryTreeItems.get(change.getEntryId());
                if (deleteItem != null) {
                    deleteItem.removeFromParent();
                }

                break;

            case undelete:
            case create:
                String typeName = m_controller.getGalleryType(
                    new Integer(change.getNewResourceTypeId())).getResourceType();
                if (typeName != null) {
                    CmsGalleryFolderEntry galleryFolder = new CmsGalleryFolderEntry();
                    galleryFolder.setSitePath(change.getSitePath());
                    galleryFolder.setResourceType(typeName);
                    galleryFolder.setStructureId(change.getEntryId());
                    galleryFolder.setOwnProperties(change.getOwnProperties());
                    galleryFolder.setIconClasses(
                        m_controller.getGalleryType(new Integer(change.getNewResourceTypeId())).getBigIconClasses());
                    CmsGalleryTreeItem folderItem = new CmsGalleryTreeItem(galleryFolder);
                    CmsSitemapHoverbar.installOn(m_controller, folderItem, galleryFolder.getStructureId());
                    m_galleryTypeItems.get(typeName).addChild(folderItem);
                    m_galleryTreeItems.put(galleryFolder.getStructureId(), folderItem);
                }
                break;

            case modify:
                CmsGalleryTreeItem changeItem = m_galleryTreeItems.get(change.getEntryId());
                if (changeItem != null) {
                    CmsListItemWidget widget = changeItem.getListItemWidget();
                    for (CmsPropertyModification mod : change.getPropertyChanges()) {
                        if (mod.getName().equals(CmsClientProperty.PROPERTY_TITLE)) {
                            widget.setTitleLabel(mod.getValue());
                        }
                    }
                    String oldPath = changeItem.getSitePath();
                    if ((change.getName() != null) && !oldPath.endsWith("/" + change.getName())) {
                        String newPath = CmsResource.getParentFolder(oldPath) + change.getName() + "/";
                        changeItem.updateSitePath(newPath);
                    }

                }
                break;
            case bumpDetailPage:
            case clipboardOnly:
            case remove:
            default:
                // nothing to do
        }
    }
576394
private void updateClassForTab(int index) {

        Widget widget = m_tabbedPanel.getWidget(index);

        String propertyTabStyle = STYLE_PROPERTIES_TAB_ACTIVE;
        if (widget == m_propertiesTab) {
            CmsImagePreviewDialog.this.addStyleName(propertyTabStyle);
        } else {
            CmsImagePreviewDialog.this.removeStyleName(propertyTabStyle);
        }
    }
118050
public void onUpdateCategoriesList(List<CmsCategoryBean> categoriesList, List<String> selectedCategories) {

        m_galleryDialog.getCategoriesTab().updateContentList(categoriesList, selectedCategories);
    }
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);
            }
         }
      }
   }