@param string $include
@param string|null $field

@return \PSolr\Request\Facet

@see http://wiki.apache.org/solr/SimpleFacetParameters#facet.range.include
@see http://lucene.apache.org/solr/4_0_0/solr-core/org/apache/solr/util/DateMathParser.html
322810
public function setRangeInclude($include, $field = null)
    {
        $param = $this->buildParam('facet.range.include', $field);
        return $this->set($param, $include);
    }
577770
public function map($field, $context = null)
    {
        $field['serializerType'] = $field['type'];
        if (substr($field['type'], -2) == '[]') {
            $field['serializerType'] = sprintf('array<%s>', substr($field['type'], 0, -2));
        }

        // @todo this assumtion is a hack and needs fixing
        if ($field['type'] === 'array') {
            $field['serializerType'] = 'array<string>';
        }

        if ($field['type'] === 'object') {
            $field['serializerType'] = 'array';
        }

        return $field;
    }
123287
public function f ($query, $includeInactiveFields = false)
    {
        $minLength = -1;
        $match     = null;
        foreach ($this->getFields($includeInactiveFields) as $field)
            /* @var $field Field */
            if (preg_match("/^(.*)" . preg_quote($query) . "$/", $field->getGlobalSlug(), $matches)) {
                $l = strlen($matches[1]);
                if ($l < $minLength || $minLength == -1) {
                    $minLength = $l;
                    $match     = $field;
                }
            }
        return $match;
    }
471661
public static function where($field)
    {
        $root = new Node(Node::TYPE_CROTCH, Node::OPERATOR_BLANK);
        $criteria = new Criteria($field, $root);
        $root->append(Node::OPERATOR_BLANK, $criteria);

        return $criteria;
    }
63406
protected function hasValidQueryParams(JsonApiSerializer $serializer, Fields $fields, Included $included)
    {
        $this->validateFieldsQueryParams($serializer, $fields, 'Fields');
        $this->validateIncludeQueryParamsTypes($serializer, $included, 'Include');

        return empty($this->queryParamErrorBag);
    }
642334
protected function resolveValue($field)
    {
        $cur = &$this->_record;
        if (array_key_exists($field, $cur)) {
            $cur = &$cur[$field];
        } else {
            return null;
        }
        return $cur;
    }
326202
public function whereLt($field = '', $x)
		{
			$this->_whereInit($field);
			$this->wheres[$field]['$lt'] = $x;

			return($this);
		}
198485
public function map($field, $context = null)
    {
        if ($context instanceof JsonDefinition &&
            $context->getField($field['fieldName']) instanceof DefinitionElementInterface
        ) {
            $fieldInformation = $context->getField($field['fieldName'])
                ->getDefAsArray();

            // in this context, the default type is the doctrine type..
            if (isset($fieldInformation['doctrineType'])) {
                $fieldInformation['type'] = $fieldInformation['doctrineType'];
            }

            $field = array_merge($field, $fieldInformation);
        }

        return $field;
    }
1341771
public function beforeFind(Field $field, array $options, $primary)
    {
        if ($primary &&
            !Router::getRequest()->isAdmin() &&
            !empty($field->extra['from']['timestamp']) &&
            !empty($field->extra['to']['timestamp'])
        ) {
            $now = time();
            if ($field->extra['from']['timestamp'] > $now ||
                $now > $field->extra['to']['timestamp']
            ) {
                return null; // remove entity from result set
            }
        }

        return true;
    }
234893
public function isIncludedField(string $resourceType, string $field): bool
    {
        if ($this->includedFields === null) {
            $this->includedFields = $this->setIncludedFields();
        }

        if (array_key_exists($resourceType, $this->includedFields) === false) {
            return true;
        }

        if (isset($this->includedFields[$resourceType][""])) {
            return false;
        }

        return isset($this->includedFields[$resourceType][$field]);
    }
1022667
public function getField($field)
    {
        return isset($this->data[$field]) ? $this->data[$field] : null;
    }
1142127
protected function get($field)
    {
        $map = $this->_config['fieldMap'];
        if (isset($map[$field])) {
            $field = $map[$field];
        }

        if (isset($this->data[$field])) {
            return $this->data[$field];
        }

        return null;
    }
711355
public function addGroupBy($field)
    {
        $alias = self::DEFAULT_TABLE_ALIAS;
        if (strpos($field, '.') > 0) {
            //monta os joins
            $newAliasField = $this->associationQueryFields($field);
        }
        if (count($this->queryFields) > 0) {
            foreach ($this->queryFields as $item) {
                $parts = [];
                if (strpos($item, ' AS ')) {
                    $item = str_replace(')', '', str_replace('(', '', $item));
                    $parts = explode('AS', $item);
                    $item = trim($parts[0]);
                }
                if (!in_array($item, $this->groupFields)) {
                    $this->queryBuilder->addGroupBy($item);
                    $this->groupFields[] = $item;
                }
            }
        }

        return $this;
    }
1176363
public function setDateGap($gap, $field = null)
    {
        $param = $this->buildParam('facet.date.gap', $field);
        return $this->set($param, $gap);
    }
748095
public function field($field, $except = false)
    {
        if (is_string($field)) {
            $field = array_map('trim', explode(',', $field));
        }
        $projection = [];
        foreach ($field as $key => $val) {
            if (is_numeric($key)) {
                $projection[$val] = $except ? 0 : 1;
            } else {
                $projection[$key] = $val;
            }
        }
        $this->options['projection'] = $projection;
        return $this;
    }
639435
public function getField($field)
    {
        if (isset($this->allFields[$field])) {
            return $this->allFields[$field];
        }

        return null;
    }
472901
public function offsetGet($field) {
        if (isset($this->values[$field]) || $this->load($field)) {
            return $this->values[$field];
        }

        return NULL;
    }