Filters the table according to given search string.<p>

@param search string to be looked for.
960373
public void filterTable(String search) {

        m_container.removeAllContainerFilters();
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(search)) {
            m_container.addContainerFilter(
                new Or(
                    new SimpleStringFilter(TableProperty.UserName, search, true, false),
                    new SimpleStringFilter(TableProperty.Site, search, true, false),
                    new SimpleStringFilter(TableProperty.Project, search, true, false)));
        }
        if ((getValue() != null) & !((Set<String>)getValue()).isEmpty()) {
            setCurrentPageFirstItemId(((Set<String>)getValue()).iterator().next());
        }
    }
64015
def filter(self, table, groups, filter_string):
        """"""
        query = filter_string.lower()
        return [group for group in groups
                if query in group.name.lower()]
519854
public void setFilters(String value) {

        m_filters = new ArrayList<String>();
        List<String> filters = CmsStringUtil.splitAsList(value, ':');
        Iterator<String> i = filters.iterator();
        while (i.hasNext()) {
            String filter = i.next();
            filter = filter.trim().toLowerCase();
            Iterator<String> j = FILTERS.iterator();
            while (j.hasNext()) {
                String candidate = j.next();
                if (candidate.startsWith(filter)) {
                    // found a matching filter
                    addFilter(candidate);
                    break;
                }
            }
        }
    }
629465
public CmsSolrResultList search(CmsObject cms, CmsSolrQuery query) throws CmsSearchException {

        return search(cms, query, false);
    }
889936
public CmsRelationFilter filterResource(CmsResource resource) {

        CmsRelationFilter filter = filterStructureId(resource.getStructureId());
        filter = filterPath(resource.getRootPath());
        return filter;
    }
804803
public void updateSearchBean(CmsGallerySearchBean searchBean) {

        m_searchBean = searchBean;
        if (searchBean != null) {
            m_pageSize = searchBean.getMatchesPerPage();
            int lastPage = searchBean.getLastPage();
            // we don't just store the search bean because it gets reused for multiple searches
            // and so the result list may change.
            m_resultBeans = searchBean.getResults();
            if (lastPage != -1) {
                loadPage(lastPage);
                m_firstShownPage = lastPage;
                if (lastPage > 1) {
                    loadPage(lastPage - 1);
                    m_firstShownPage = lastPage - 1;
                }
            }
        } else {
            m_resultBeans = null;
        }
    }
105718
public SearchResponse searchAll(boolean isSetExplain, String[] indices,
            String[] types, QueryBuilder filterQueryBuilder) {
        return searchAll(isSetExplain, indices, types,
                filterQueryBuilder, null);
    }
170174
protected synchronized void replaceQuerySearchPatterns() {

        String currentKey = null;
        String currentValue = null;
        int startIndex = 0;
        int endIndex = 0;
        int lastIndex = 0;

        Iterator<String> allKeys = m_queries.keySet().iterator();
        while (allKeys.hasNext()) {
            currentKey = allKeys.next();
            currentValue = m_queries.get(currentKey);
            startIndex = 0;
            endIndex = 0;
            lastIndex = 0;

            while ((startIndex = currentValue.indexOf("${", lastIndex)) != -1) {
                endIndex = currentValue.indexOf('}', startIndex);
                if ((endIndex != -1) && !currentValue.startsWith(QUERY_PROJECT_SEARCH_PATTERN, startIndex - 1)) {

                    String replaceKey = currentValue.substring(startIndex + 2, endIndex);
                    String searchPattern = currentValue.substring(startIndex, endIndex + 1);
                    String replacePattern = this.readQuery(replaceKey);

                    if (replacePattern != null) {
                        currentValue = CmsStringUtil.substitute(currentValue, searchPattern, replacePattern);
                    }
                }

                lastIndex = endIndex + 2;
            }
            m_queries.put(currentKey, currentValue);
        }
    }
1177423
public void setSearchRoots(List<String> searchRoots) {

        if ((searchRoots != null) && !searchRoots.isEmpty()) {
            addFilterQuery(CmsSearchField.FIELD_PARENT_FOLDERS, searchRoots, false, true);
        }
    }
354269
public void addFilter(Filter filter) {
		List<Filter> filters = filterFactory.getAllFilter();
		
		int index = searchFilterIndex(filters, filter.getId(), 0, filters.size());
		
		if (index == -1) {
			// not found - put at the end
			filters.add(filter);
		} else {
			filters.add(index, filter);
		}
	}
818135
@Override
	public void search(
		String[] words,
		WebSiteRequest req,
		HttpServletResponse response,
		List<SearchResult> results,
		AoByteArrayOutputStream bytes,
		List<WebPage> finishedPages
	) {
	}
275030
public static SearchFilter newSearchFilter(final String filterQuery, final String... params) {
        final SearchFilter filter = new SearchFilter();
        filter.setFilter(filterQuery);
        if (params != null) {
            for (int i = 0; i < params.length; i++) {
                if (filter.getFilter().contains("{" + i + "}")) {
                    filter.setParameter(i, params[i]);
                } else {
                    filter.setParameter("user", params[i]);
                }
            }
        }
        LOGGER.debug("Constructed LDAP search filter [{}]", filter.format());
        return filter;
    }
69864
public TrieNode matchPredictor(String search) {
    TrieNode cursor = matchEnd(search);
    if (cursor.getNumberOfChildren() > 0) {
      return cursor;
    }
    String string = cursor.getString();
    if (string.isEmpty()) return null;
    return matchPredictor(string.substring(1));
  }
315765
protected void filterTable(String text) {

        Container.Filterable container = (Container.Filterable)m_table.getContainerDataSource();
        container.removeAllContainerFilters();
        if (!CmsStringUtil.isEmptyOrWhitespaceOnly(text)) {
            container.addContainerFilter(
                new Or(
                    new SimpleStringFilter("name", text, true, false),
                    new SimpleStringFilter("title", text, true, false)));
        }
    }
173416
public void setSearchText(String searchText) {
        if (TextUtils.isEmpty(searchText)) {
            searchText = null;
        }
        this.searchText = searchText;
        if (this.searchBox != null) {
            this.searchBox.setText(searchText);
        }
    }
1029413
def filter(self, table, mappings, filter_string):
        """"""
        q = filter_string.lower()
        return [mapping for mapping in mappings
                if q in mapping.ud.lower()]
839547
private void searchProperties(List<CmsResource> resources) {

        if (CmsSourceSearchForm.REGEX_ALL.equals(m_settings.getSearchpattern())) {
            for (CmsResource resource : resources) {
                m_matchedResources.add(resource);
                getReport().println(
                    Messages.get().container(Messages.RPT_SOURCESEARCH_MATCHED_0),
                    I_CmsReport.FORMAT_OK);
            }

        } else {
            for (CmsResource resource : resources) {
                Matcher matcher;
                try {
                    CmsProperty prop = getCms().readPropertyObject(resource, m_settings.getProperty().getName(), false);
                    matcher = Pattern.compile(m_settings.getSearchpattern()).matcher(prop.getValue());
                    if (matcher.find()) {
                        m_matchedResources.add(resource);
                        getReport().println(
                            Messages.get().container(Messages.RPT_SOURCESEARCH_MATCHED_0),
                            I_CmsReport.FORMAT_OK);
                    } else {
                        getReport().println(
                            Messages.get().container(Messages.RPT_SOURCESEARCH_NOT_MATCHED_0),
                            I_CmsReport.FORMAT_NOTE);
                    }

                } catch (CmsException e) {
                    LOG.error("Ubable to read property", e);
                }
            }
        }
        if (m_replace) {
            replaceProperties(m_matchedResources);
        }
        // report results
        reportResults(resources.size());
    }