addFacet

@param mixed $name
@param array $query
@access public
@return void
486218
public function addFacet($name, $query = array())
	{
		$this->facetSet = $this->query->getFacetSet();

		$string = $this->makeQueryString($query);
		$this->facetSet->createFacetQuery($name)->setQuery($string);

		return $this;
	}
583775
public function addField(string $name, string $value) : void
    {
        $this->fields[$name][] = $value;
    }
845320
public final FacetOptions addFacetQuery(SolrDataQuery query) {
		Assert.notNull(query, "Facet Query must not be null.");

		this.facetQueries.add(query);
		return this;
	}
80386
public function addQuery($query)
    {
        $uri = clone $this;
        $query = is_array($query) ? http_build_query($query, PHP_QUERY_RFC3986) : $query;

        parse_str($query, $newQuery);

        if ( ! empty($uri->query)) {
            parse_str($uri->query, $oldQuery);
            $query = array_merge($oldQuery, $newQuery);
        } else {
            $query = $newQuery;
        }

        if (is_array($query)) {
            $uri->query = http_build_query($query, PHP_QUERY_RFC3986);
        }

        return $uri;
    }
173205
public function setFacet($name)
    {
        if ($this->getSearchParam('facet') === null) {
            $this->setSearchParams('facet', 'true');
        }

        $this->setSearchParams('facet.field', $name);

        return $this;
    }
781929
public function addFlag(string $name): void
    {
        if (!$this->hasFlag($name)) {
            $flagEntry = $this->entry[PoTokens::FLAG];
            if ($flagEntry === null) {
                $this->set(PoTokens::FLAG, $name);
            } elseif (is_array($flagEntry)) {
                $flagEntry[] = $name;
                $this->set(PoTokens::FLAG, implode(',', $flagEntry));
            } else {
                $this->set(PoTokens::FLAG, $flagEntry . ',' . $name);
            }
        }
    }
1029647
public function addQueries(array $queries = array()) {
	    foreach($queries as $queryInfo) {
	        $batchAction = (isset($queryInfo[1])) ? $queryInfo[1] : null;
	        $this->addQuery($queryInfo[0], $batchAction);
	    }
	}
213978
public function withQuery(array $query = [])
    {
        // Set Query in class.
        $this->query = collect($this->query)->merge($query)->all();

        return $this;
    }
152140
public function addButton(string $name): void
    {
        $options = $this->formOptions['fields'][$name];

        $button = HtmlTag::createElement('button')
            ->set('id', $name)
            ->set('type', $options['type'] ?? 'button')
            ->text($options['text'] ?? '');

        if (isset($options['text'])) {
            unset($options['text']);
        }

        foreach ($options as $attr => $value) {
            $button->set($attr, $value);
        }

        echo $button;
    }
222968
public function apply($name, $value, $query, FilterInterface $filter)
    {
        $column = ( ! empty($this->table) ? $this->table . '.' : null)
            . ( ! empty($this->column) ? $this->column : $name);


        // an array of values: do a whereIn query
        if (is_a($value, Arrayable::class)) $value = $value->toArray();

        if (is_array($value)) {

            $query->whereIn($column, $value);

            return $query;
        }

        // otherwise, do a normal where
        return $query->where($column, $this->operator, $value);
    }
418269
public function queryParams(array $query)
	{
		$this->query = Arrays::mergeDeep($this->query, $query);
		
		return $this;
	}
1267782
public function add_fields($query) {
        $documentclass = $this->get_document_classname();
        $fields = $documentclass::get_default_fields_definition();

        $dismax = false;
        if ($query instanceof \SolrDisMaxQuery) {
            $dismax = true;
        }

        foreach ($fields as $key => $field) {
            $query->addField($key);
            if ($dismax && !empty($field['mainquery'])) {
                // Add fields the main query should be run against.
                $query->addQueryField($key);
            }
        }
    }
927165
public function addFilter($name, $query = array(), $tag = 'root_type')
	{
		if (is_array($query))
		{
			$string = $this->makeQueryString($query);
		}
		elseif (is_string($query))
		{
			$string = $query;
			if ($name == 'BoundingBox')
			{
				$this->query->setOptions(array('geo'=> true));
			}
		}
		$filterParams = array();
		$filterParams['key'] = $name;
		$filterParams['query'] = $string;
		if ($tag)
		{
			$filterParams['tag'] = $tag;
		}

		$this->query->createFilterQuery($filterParams);
		return $this;
	}
863901
public function addSubQuery(
        string $name,
        Query $query
    ): self {
        $this->subqueries[$name] = $query;

        return $this;
    }
1119270
public static function addEntry($name, $link = '', $active = false)
	{
		static::getRoot()->appendButton($name, $link, $active);
	}
1306369
protected void addFacetOptions(StringBuffer query, final boolean useLimit) {

        // mincount
        if (m_config.getMinCount() != null) {
            appendFacetOption(query, "mincount", m_config.getMinCount().toString());
        }
        // limit
        if (useLimit && (m_config.getLimit() != null)) {
            appendFacetOption(query, "limit", m_config.getLimit().toString());
        }
        // sort
        if (m_config.getSortOrder() != null) {
            appendFacetOption(query, "sort", m_config.getSortOrder().toString());
        }
        // prefix
        if (!m_config.getPrefix().isEmpty()) {
            appendFacetOption(query, "prefix", m_config.getPrefix());
        }
    }
1214156
public function add(string $email, string $name = null): void
    {
        $replyToRecipient = $this->make();
        $replyToRecipient->email = $email;
        if ($name !== null) {
            $replyToRecipient->name = $name;
        }
        $this->set($replyToRecipient);
    }