Query.

@param string $query

@return SearchResult[]
17746
public function search($query)
    {
        $searchProviders = [];

        foreach ($this->searchProviders as $searchProvider) {
            if (!$searchProvider instanceof SearchProviderInterface) {
                continue;
            }

            $role = $searchProvider->getRole();
            if ($role && !$this->authorizationChecker->isGranted($role)) {
                continue;
            }

            $searchProviders[] = $searchProvider;
        }

        $explodedQuery = explode(':', $query);
        if (count($explodedQuery) > 1) {
            $keySearchProviders = [];
            $keyWord = strtolower(array_shift($explodedQuery));

            foreach ($searchProviders as $searchProvider) {
                $searchKey = $searchProvider->getSearchKey();
                if ($searchKey === $keyWord) {
                    $keySearchProviders[] = $searchProvider;
                }
            }

            if (count($keySearchProviders)) {
                $searchProviders = $keySearchProviders;
                $query = trim(implode(':', $explodedQuery));
            }
        }

        $results = [];
        foreach ($searchProviders as $searchProvider) {
            $searchResults = $searchProvider->search($query);
            foreach ($searchResults as $searchResult) {
                $results[] = $searchResult->toArray();
            }
        }

        return $results;
    }
576453
public function search($query)
    {
        if($query instanceof Query) {
            return $this->obj_gateway->search($query);
        }
        return $this->obj_gateway->search(new Query((string)$query));
    }
755313
protected function _callQuery($query)
    {
        $query->contain($this->type['contain']);
        $extQuery = $this->type['query'];
        return $extQuery($query);
    }
83089
public function _search($query, $parameters = [])
    {
        /** @var \AlgoliaSearch\Laravel\ModelHelper $modelHelper */
        $modelHelper = App::make('\AlgoliaSearch\Laravel\ModelHelper');

        $index = null;

        if (isset($parameters['index'])) {
            $index = $modelHelper->getIndices($this, $parameters['index'])[0];
            unset($parameters['index']);
        } else {
            $index = $modelHelper->getIndices($this)[0];
        }

        $result = $index->search($query, $parameters);

        return $result;
    }
1228247
private function query($query)
    {
		if(!is_array($query)) {
			return q($query);
		} else {
			foreach($query as $v) {
				q($v);
			}
			return true;
		}
    }
931142
public function getResults($query)
    {
        $searchResults = [];

        if ($query == '') {
            return $searchResults;
        }

        if ($this->searchEngineId == '') {
            throw new \Exception('You must specify a searchEngineId');
        }

        $client = new Client();
        $result = $client->get('http://www.google.com/cse', ['query' => ['cx' => $this->searchEngineId,
                'client' => 'google-csbe',
                'num' => 20,
                'output' => 'xml_no_dtd',
                'q' => $query,
            ],
        ]);

        if ($result->getStatusCode() != 200) {
            throw new Exception('Resultcode was not ok: '.$result->getStatusCode());
        }

        $xml = simplexml_load_string($result->getBody());

        if ($xml->ERROR) {
            throw new Exception('XML indicated service error: '.$xml->ERROR);
        }

        if ($xml->RES->R) {
            $i = 0;
            foreach ($xml->RES->R as $item) {
                $searchResults[$i]['name'] = (string) $item->T;
                $searchResults[$i]['url'] = (string) $item->U;
                $searchResults[$i]['snippet'] = (string) $item->S;
                $searchResults[$i]['image'] = $this->getPageMapProperty($item, 'cse_image', 'src');

                $searchResults[$i]['product']['name'] = $this->getPageMapProperty($item, 'product', 'name');
                $searchResults[$i]['product']['brand'] = $this->getPageMapProperty($item, 'product', 'brand');
                $searchResults[$i]['product']['price'] = $this->getPageMapProperty($item, 'product', 'price');
                $searchResults[$i]['product']['image'] = $this->getPageMapProperty($item, 'product', 'image');
                $searchResults[$i]['product']['identifier'] = $this->getPageMapProperty($item, 'product', 'identifier');

                $searchResults[$i]['offer']['price'] = $this->getPageMapProperty($item, 'offer', 'price');
                $searchResults[$i]['offer']['pricecurrency'] = $this->getPageMapProperty($item, 'offer', 'pricecurrency');

                ++$i;
            }
        }

        return $searchResults;
    }
464698
public function search($query) {
        $found = false;
        if (strpos(strtolower($this->name), $query) !== false) {
            $found = true;
        } else if (strpos(core_text::strtolower($this->visiblename), $query) !== false) {
                $found = true;
            }
        if ($found) {
            $result = new stdClass();
            $result->page     = $this;
            $result->settings = array();
            return array($this->name => $result);
        } else {
            return array();
        }
    }
600373
public function search($query)
    {
        $this->validate($query);
        $client = $this->client->getClient();
        $result = array();
        // Change the match column name with the column name you want to search in it.
        $params = [
                'index' => $this->client->getIndex(),
                'type'  => $this->client->getType(),
                'body'  => [
                    'query' => [
                        'match' => [ $this->searchColumn => $query],
                    ],
                ],
            ];
        $query  = $client->search($params);
            
        return  $this->extractResult($query);
    }
489714
public function getList(array $query = [])
    {
        $list = $this->pagination(
            self::DOMUSERP_API_OPERACIONAL . '/categorias/' . $this->categoryId . '/subcategorias',
            $query
        );

        return $list;
    }
79261
public function getResults($query)
    {
        $parameters = [];

        if (is_object($query) && $query instanceof SearchQuery) {
            $query = $query->toArray();
        }

        if (is_array($query)) {
            $collection = new Collection($query);

            $query = $collection->pull('query', '');

            $parameters = $collection->toArray();
        }

        return $this->index->search($query, $parameters);
    }
1273110
public function search($query)
    {
        $endpoint = $this->endpoint . '/search';

        $params = array_merge($this->prepareParams(), ['query' => $query]);

        $response = $this->restClient->get($endpoint, $params);

        return $response['body'];
    }
311197
public function search($query) {
        $this->reset_state();
        $result = $this->request($this->make_url('/search', array('query' => $query, 'limit' => 50, 'offset' => 0)));
        return json_decode($result);
    }
884067
protected function parseSub($query)
    {
        if ($query instanceof self || $query instanceof EloquentBuilder) {
            return [$query->toSql(), $query->getBindings()];
        } elseif (is_string($query)) {
            return [$query, []];
        } else {
            throw new InvalidArgumentException;
        }
    }
1227802
public function search($query) {
        $found = array();

        foreach ($this->settings as $setting) {
            if ($setting->is_related($query)) {
                $found[] = $setting;
            }
        }

        if ($found) {
            $result = new stdClass();
            $result->page     = $this;
            $result->settings = $found;
            return array($this->name => $result);
        }

        $found = false;
        if (strpos(strtolower($this->name), $query) !== false) {
            $found = true;
        } else if (strpos(core_text::strtolower($this->visiblename), $query) !== false) {
                $found = true;
            }
        if ($found) {
            $result = new stdClass();
            $result->page     = $this;
            $result->settings = array();
            return array($this->name => $result);
        } else {
            return array();
        }
    }
705270
public function search($query)
    {
        $classes = $this->getClassMetadata();
        return $this->_sm->getUnitOfWork()->loadCollection($classes, $query);
    }
666871
public static function query($query = [])
    {
        if (func_num_args()) {
            static::$_query[static::class] = is_array($query) ? $query : [];
        }
        return isset(static::$_query[static::class]) ? static::$_query[static::class] : [];
    }
222833
private function expandQueryIndexes(SearchQuery $query)
    {
        $expandedIndexes = [];

        foreach ($query->getIndexes() as $index) {
            foreach ($this->getDecoratedIndexNames($index, $query->getLocale()) as $expandedIndex) {
                $expandedIndexes[$expandedIndex] = $expandedIndex;
            }
        }

        $query->setIndexes($expandedIndexes);
    }