This method performs part of the factory search outlined in section 10.2.6.1.
496274
@Override
    public FacesConfig getMetaInfServicesFacesConfig(ExternalContext ectx)
    {
        try
        {
            org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl facesConfig
                    = new org.apache.myfaces.config.impl.digester.elements.FacesConfigImpl();
            org.apache.myfaces.config.impl.digester.elements.FactoryImpl factory
                    = new org.apache.myfaces.config.impl.digester.elements.FactoryImpl();
            
            facesConfig.addFactory(factory);
            
            for (String factoryName : FACTORY_NAMES)
            {
                List<String> classList = ServiceProviderFinderFactory.getServiceProviderFinder(ectx)
                        .getServiceProviderList(factoryName);
                
                for (String className : classList)
                {
                    if (log.isLoggable(Level.INFO))
                    {
                        log.info("Found " + factoryName + " factory implementation: " + className);
                    }

                    if (factoryName.equals(FactoryFinder.APPLICATION_FACTORY))
                    {
                        factory.addApplicationFactory(className);
                    } 
                    else if(factoryName.equals(FactoryFinder.EXCEPTION_HANDLER_FACTORY)) 
                    {
                        factory.addExceptionHandlerFactory(className);
                    } 
                    else if (factoryName.equals(FactoryFinder.EXTERNAL_CONTEXT_FACTORY))
                    {
                        factory.addExternalContextFactory(className);
                    } 
                    else if (factoryName.equals(FactoryFinder.FACES_CONTEXT_FACTORY))
                    {
                        factory.addFacesContextFactory(className);
                    } 
                    else if (factoryName.equals(FactoryFinder.LIFECYCLE_FACTORY))
                    {
                        factory.addLifecycleFactory(className);
                    } 
                    else if (factoryName.equals(FactoryFinder.RENDER_KIT_FACTORY))
                    {
                        factory.addRenderkitFactory(className);
                    } 
                    else if(factoryName.equals(FactoryFinder.TAG_HANDLER_DELEGATE_FACTORY)) 
                    {
                        factory.addTagHandlerDelegateFactory(className);
                    } 
                    else if (factoryName.equals(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY))
                    {
                        factory.addPartialViewContextFactory(className);
                    } 
                    else if(factoryName.equals(FactoryFinder.VISIT_CONTEXT_FACTORY)) 
                    {
                        factory.addVisitContextFactory(className);
                    } 
                    else if(factoryName.equals(FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY)) 
                    {
                        factory.addViewDeclarationLanguageFactory(className);
                    }
                    else if(factoryName.equals(FactoryFinder.FLASH_FACTORY)) 
                    {
                        factory.addFlashFactory(className);
                    }
                    else if(factoryName.equals(FactoryFinder.FLOW_HANDLER_FACTORY)) 
                    {
                        factory.addFlowHandlerFactory(className);
                    }
                    else if(factoryName.equals(FactoryFinder.CLIENT_WINDOW_FACTORY)) 
                    {
                        factory.addClientWindowFactory(className);
                    }
                    else if(factoryName.equals(FactoryFinder.FACELET_CACHE_FACTORY)) 
                    {
                        factory.addFaceletCacheFactory(className);
                    }
                    else
                    {
                        throw new IllegalStateException("Unexpected factory name " + factoryName);
                    }
                }
            }
            return facesConfig;
        }
        catch (Throwable e)
        {
            throw new FacesException(e);
        }
    }
1088315
private IBundleProvider performSearch(String theCriteria) {
		IFhirResourceDao<?> subscriptionDao = myDaoRegistry.getSubscriptionDao();
		RuntimeResourceDefinition responseResourceDef = subscriptionDao.validateCriteriaAndReturnResourceDefinition(theCriteria);
		SearchParameterMap responseCriteriaUrl = myMatchUrlService.translateMatchUrl(theCriteria, responseResourceDef);

		IFhirResourceDao<? extends IBaseResource> responseDao = myDaoRegistry.getResourceDao(responseResourceDef.getImplementingClass());
		responseCriteriaUrl.setLoadSynchronousUpTo(1);

		TransactionTemplate txTemplate = new TransactionTemplate(myTxManager);
		txTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
		return txTemplate.execute(t -> responseDao.search(responseCriteriaUrl));

	}
1286365
public function frequentlySearchedAction()
    {
        /** @var  $searchResultSet SearchResultSet */
        $searchResultSet = GeneralUtility::makeInstance(SearchResultSet::class);

        $pageId = $this->typoScriptFrontendController->getRequestedId();
        $languageId = $this->typoScriptFrontendController->sys_language_uid;
        $searchRequest = $this->getSearchRequestBuilder()->buildForFrequentSearches($pageId, $languageId);
        $searchResultSet->setUsedSearchRequest($searchRequest);

        $this->controllerContext->setSearchResultSet($searchResultSet);

        $values = [
            'additionalFilters' => $this->getAdditionalFilters(),
            'resultSet' => $searchResultSet
        ];
        $values = $this->emitActionSignal(__CLASS__, __FUNCTION__, [$values]);

        $this->view->assignMultiple($values);
    }
610068
private void doSearch()
    {
        setSearchPanelVisible(true);
        String selectedText = textComponent.getSelectedText();
        if (selectedText != null)
        {
            searchPanel.setQuery(selectedText);
        }
        searchPanel.requestFocusForTextField();
    }
892238
private static int search(ArrayList<Entry> entries, int target, int start, int end) {
    while (true) {
      int mid = ((end - start) / 2) + start;
      int compare = compareEntry(entries, mid, target);
      if (compare == 0) {
        return mid;
      } else if (compare < 0) {
        // it is in the upper half
        start = mid + 1;
        if (start > end) {
          return end;
        }
      } else {
        // it is in the lower half
        end = mid - 1;
        if (end < start) {
          return end;
        }
      }
    }
  }
771953
def search(self):
        
        self.log.debug('starting the ``get`` method')

        sqlQuery = self._get_on_trixel_sources_from_database_query()

        databaseRows = self._execute_query(sqlQuery)
        matchIndies, matches = self._list_crossmatch(databaseRows)

        from fundamentals.renderer import list_of_dictionaries
        matches = list_of_dictionaries(
            log=self.log,
            listOfDictionaries=matches,
            reDatetime=self.reDatetime
        )

        self.log.debug('completed the ``get`` method')
        return matchIndies, matches
484689
@Override
    public void _search(String fieldName, String searchTerms) {
        _search(fieldName, searchTerms, SearchOperator.OR);
    }
256716
public function columnSearch()
    {
        $columns = $this->request->columns();

        foreach ($columns as $index => $column) {
            if (! $this->request->isColumnSearchable($index)) {
                continue;
            }

            $column = $this->getColumnName($index);

            if ($this->hasFilterColumn($column)) {
                $keyword = $this->getColumnSearchKeyword($index, $raw = true);
                $this->applyFilterColumn($this->getBaseQueryBuilder(), $column, $keyword);
            } else {
                $column  = $this->resolveRelationColumn($column);
                $keyword = $this->getColumnSearchKeyword($index);
                $this->compileColumnSearch($index, $column, $keyword);
            }

            $this->isFilterApplied = true;
        }
    }
1151949
@Override
    public Collection<MonetaryAmountFactory<?>> getAmountFactories(MonetaryAmountFactoryQuery factoryQuery){
        Objects.requireNonNull(factoryQuery);
        List<MonetaryAmountFactory<?>> factories = new ArrayList<>();
        // first check for explicit type
        for(@SuppressWarnings("unchecked") MonetaryAmountFactoryProviderSpi<? extends MonetaryAmount> factory : Bootstrap
                .getServices(MonetaryAmountFactoryProviderSpi.class)){
            if(factory.getQueryInclusionPolicy() == QueryInclusionPolicy.NEVER){
                continue;
            }
            if(factoryQuery.getTargetType() == factory.getAmountType()){
                if(isPrecisionOK(factoryQuery, factory.getMaximalMonetaryContext())){
                    factories.add(factory.createMonetaryAmountFactory());
                }else{
                    throw new MonetaryException("Incompatible context required=" + factoryQuery + ", maximal=" +
                                                        factory.getMaximalMonetaryContext());
                }
            }
        }
        List<MonetaryAmountFactoryProviderSpi<? extends MonetaryAmount>> selection = new ArrayList<>();
        for(@SuppressWarnings("unchecked") MonetaryAmountFactoryProviderSpi<? extends MonetaryAmount> factory : Bootstrap
                .getServices(MonetaryAmountFactoryProviderSpi.class)){
            if(factory.getQueryInclusionPolicy() == QueryInclusionPolicy.DIRECT_REFERENCE_ONLY ||
                    factory.getQueryInclusionPolicy() == QueryInclusionPolicy.NEVER){
                continue;
            }
            if(isPrecisionOK(factoryQuery, factory.getMaximalMonetaryContext())){
                selection.add(factory);
            }
        }
        if(selection.isEmpty()){
            // fall back, add all selections, ignore flavor
            for(@SuppressWarnings("unchecked") MonetaryAmountFactoryProviderSpi<? extends MonetaryAmount> factory : Bootstrap
                    .getServices(MonetaryAmountFactoryProviderSpi.class)){
                if(factory.getQueryInclusionPolicy() == QueryInclusionPolicy.DIRECT_REFERENCE_ONLY ||
                        factory.getQueryInclusionPolicy() == QueryInclusionPolicy.NEVER){
                    continue;
                }
                if(isPrecisionOK(factoryQuery, factory.getMaximalMonetaryContext())){
                    selection.add(factory);
                }
            }
        }
        if(selection.size() == 1){
            factories.add(selection.get(0).createMonetaryAmountFactory());
        }

		MonetaryContext context = createContext(factoryQuery);

		factories.forEach(f -> f.setContext(context));
        selection.sort(CONTEXT_COMPARATOR);
        factories.add(selection.get(0).createMonetaryAmountFactory());
        return factories;
    }
207904
def search_product(self, limit=100, offset=0, with_price=0, with_supported_software=0,
                       with_description=0):
        """"""

        response = self.request(E.searchProductSslCertRequest(
            E.limit(limit),
            E.offset(offset),
            E.withPrice(int(with_price)),
            E.withSupportedSoftware(int(with_supported_software)),
            E.withDescription(int(with_description)),
        ))
        return response.as_models(SSLProduct)
345118
@Override
    public boolean selectFactory(DetectorFactory factory) {
        return (plugin == null || plugin == factory.getPlugin()) && factory.isReportingDetector();
    }
937021
protected function _process()
	{
		$this->_msg( 'Processing product demo data', 0 );

		$context =  $this->_getContext();
		$manager = MShop_Factory::createManager( $context, 'product' );

		$search = $manager->createSearch();
		$search->setConditions( $search->compare( '=~', 'product.code', 'demo-' ) );
		$products = $manager->searchItems( $search );


		foreach( $products as $item )
		{
			$this->_removeItems( $item->getId(), 'product/list', 'product', 'attribute' );
			$this->_removeItems( $item->getId(), 'product/list', 'product', 'media' );
			$this->_removeItems( $item->getId(), 'product/list', 'product', 'price' );
			$this->_removeItems( $item->getId(), 'product/list', 'product', 'text' );
			$this->_removeListItems( $item->getId(), 'product/list', 'product' );
		}

		$manager->deleteItems( array_keys( $products ) );


		if( $context->getConfig()->get( 'setup/default/demo', false ) == true )
		{
			$this->_addDemoData();
			$this->_status( 'added' );
		}
		else
		{
			$this->_status( 'removed' );
		}
	}
959849
@Override
    protected void searchStep() {
        // more solutions to generate ?
        if(solutionIterator.hasNext()){
            // generate next solution
            SolutionType sol = solutionIterator.next();
            // update best solution
            updateBestSolution(sol);
        } else {
            // done
            stop();
        }
    }
592194
def filter(self, search):
        '''
        
        '''
        if not self._filters:
            return search
        filters = Q('match_all')
        for f in self._filters.values():
            filters &= f
        return search.filter(filters)
1067680
protected void quickSearch() {

        List<CmsTreeItem> categories = new ArrayList<CmsTreeItem>();
        if ((m_quickSearch != null)) {
            categories = getFilteredCategories(hasQuickFilter() ? m_quickSearch.getFormValueAsString() : null);
            sort(categories, SortParams.valueOf(m_sortSelectBox.getFormValueAsString()));
        }
    }
122173
public function process()
	{
		$view = $this->getView();
		$context = $this->_getContext();
		$ids = $view->param( 'fav-id', array() );


		if( $context->getUserId() != null && !empty( $ids ) )
		{
			$typeItem = $this->_getTypeItem();
			$manager = MShop_Factory::createManager( $context, 'customer/list' );

			$search = $manager->createSearch();
			$expr = array(
				$search->compare( '==', 'customer.list.parentid', $context->getUserId() ),
				$search->compare( '==', 'customer.list.refid', $ids ),
				$search->compare( '==', 'customer.list.domain', 'product' ),
				$search->compare( '==', 'customer.list.typeid', $typeItem->getId() ),
			);
			$search->setConditions( $search->combine( '&&', $expr ) );

			$items = array();
			foreach( $manager->searchItems( $search ) as $item ) {
				$items[ $item->getRefId() ] = $item;
			}


			switch( $view->param( 'fav-action' ) )
			{
				case 'add':

					$item = $manager->createItem();
					$item->setParentId( $context->getUserId() );
					$item->setTypeId( $typeItem->getId() );
					$item->setDomain( 'product' );
					$item->setStatus( 1 );

					foreach( (array) $view->param( 'fav-id', array() ) as $id )
					{
						if( !isset( $items[$id] ) )
						{
							$item->setId( null );
							$item->setRefId( $id );

							$manager->saveItem( $item );
							$manager->moveItem( $item->getId() );
						}
					}

					break;

				case 'delete':

					$listIds = array();

					foreach( (array) $view->param( 'fav-id', array() ) as $id )
					{
						if( isset( $items[$id] ) ) {
							$listIds[] = $items[$id]->getId();
						}
					}

					$manager->deleteItems( $listIds );
					break;
			}
		}

		parent::process();
	}
718285
public void search(
        Map<String, List<String>> fieldFacets,
        Map<String, List<String>> rangeFacets,
        String additionalQuery) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly((String)m_resultSorter.getValue())) {
            m_currentConfigParser.setSortOption((String)m_resultSorter.getValue());
        }

        CmsSolrQuery query = m_currentConfigParser.getInitialQuery();
        CmsSearchController controller = new CmsSearchController(new CmsSearchConfiguration(m_currentConfigParser));
        controller.getPagination().getState().setCurrentPage(1);
        if (fieldFacets != null) {
            Map<String, I_CmsSearchControllerFacetField> fieldFacetControllers = controller.getFieldFacets().getFieldFacetController();
            for (Map.Entry<String, List<String>> facetEntry : fieldFacets.entrySet()) {
                I_CmsSearchStateFacet state = fieldFacetControllers.get(facetEntry.getKey()).getState();
                state.clearChecked();
                for (String check : facetEntry.getValue()) {
                    state.addChecked(check);
                }
            }
        }
        if (rangeFacets != null) {
            Map<String, I_CmsSearchControllerFacetRange> rangeFacetControllers = controller.getRangeFacets().getRangeFacetController();
            for (Map.Entry<String, List<String>> facetEntry : rangeFacets.entrySet()) {
                I_CmsSearchStateFacet state = rangeFacetControllers.get(facetEntry.getKey()).getState();
                state.clearChecked();
                for (String check : facetEntry.getValue()) {
                    state.addChecked(check);
                }
            }
        }
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(additionalQuery)) {
            controller.getCommon().getState().setQuery(additionalQuery);
        } else {
            resetTextSearch();
        }

        controller.addQueryParts(query, A_CmsUI.getCmsObject());
        executeSearch(controller, query);
    }