<commit_before><?php

namespace G4\DataMapper\Engine\Solr;

use G4\DataMapper\Common\Identity;

class SolrIdentity extends Identity implements SolrIdentityInterface
{
    private $rawQuery;

    public function setRawQuery($value)
    {
        $this->rawQuery = $value;
    }

    public function getRawQuery()
    {
        $this->rawQuery;
    }

    public function hasRawQuery()
    {
        return !empty($this->rawQuery);
    }
}
<commit_msg>000 - Added geodist method.<commit_after><?php

namespace G4\DataMapper\Engine\Solr;

use G4\DataMapper\Common\Identity;
use G4\DataMapper\Common\Selection\Operator;
use G4\DataMapper\Common\SingleValue;
use G4\DataMapper\Common\CoordinatesValue;

class SolrIdentity extends Identity implements SolrIdentityInterface
{

    /**
     * @var string
     */
    private $rawQuery;

    /**
     * @param $value
     */
    public function setRawQuery($value)
    {
        $this->rawQuery = $value;
    }

    /**
     * @return string
     */
    public function getRawQuery()
    {
        return $this->rawQuery;
    }

    /**
     * @return bool
     */
    public function hasRawQuery()
    {
        return !empty($this->rawQuery);
    }

    /**
     * @param string $value
     * @return SolrIdentity
     */
    public function timeFromInMinutes($value)
    {
        $this->arrayException($value);
        $this->operator(Operator::TIME_FROM_IN_MINUTES, new SingleValue($value));
        return $this;
    }

    /**
     * @param $latitude
     * @param $longitude
     * @param $distance
     * @return SolrIdentity
     */
    public function geodist($latitude, $longitude, $distance)
    {
        $coordinates = new CoordinatesValue($latitude, $longitude);

        if (isset($distance)) {
            $coordinates->setDistance($distance);
        }

        $this->operator(Operator::GEODIST, $coordinates);
        return $this;
    }
}

{'fraction_non_alphanumeric': 0.12250262881177708, 'fraction_numerical': 0.005257623554153523, 'mean_word_length': 2.435018050541516, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3200953', 'n_tokens_mistral': 590, 'n_tokens_neox': 575, 'n_words': 110}