<commit_before><?php

namespace Sajari\Search;

require_once __DIR__.'/../proto/engine/query/v1/query.php';

use sajari\engine\query\v1\FieldBoost\Filter as ProtoFilter;
use sajari\engine\query\v1\FieldBoost as ProtoFieldBoost;

class FilterFieldBoost extends FieldBoost
{
    /** @var Filter $filter */
    private $filter;
    /** @var float $value */
    private $value;

    /**
     * FilterMetaBoost constructor.
     * @param Filter $filter
     * @param float $value
     */
    public function __construct(Filter $filter, $value)
    {
        $this->filter = $filter;
        $this->value = $value;
    }

    /**
     * @return Filter
     */
    public function getFilter()
    {
        return $this->filter;
    }

    /**
     * @return float
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * @return engine\query\FieldBoost
     */
    public function Proto()
    {
        $fmb = new ProtoFilter();
        $fmb->setFilter($this->filter->Proto());
        $fmb->setValue($this->value);

        $mb = new ProtoFieldBoost();
        $mb->setFilter($fmb);
        return $mb;
    }
}
<commit_msg>Update FilterFieldBoost<commit_after><?php

namespace Sajari\Search;

require_once __DIR__.'/../proto/engine/query/v1/query.php';

use sajari\engine\query\v1\FieldBoost\Filter as EngineFilter;
use sajari\engine\query\v1\FieldBoost as EngineFieldBoost;

class FilterFieldBoost extends FieldBoost
{
    /** @var Filter $filter */
    private $filter;
    /** @var float $value */
    private $value;

    /**
     * FilterMetaBoost constructor.
     * @param Filter $filter
     * @param float $value
     */
    public function __construct(Filter $filter, $value)
    {
        $this->filter = $filter;
        $this->value = $value;
    }

    /**
     * @return Filter
     */
    public function getFilter()
    {
        return $this->filter;
    }

    /**
     * @return float
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * @return EngineFieldBoost
     */
    public function Proto()
    {
        $fmb = new EngineFilter();
        $fmb->setFilter($this->filter->Proto());
        $fmb->setValue($this->value);

        $mb = new EngineFieldBoost();
        $mb->setFilter($fmb);
        return $mb;
    }
}

{'fraction_non_alphanumeric': 0.14304179233089187, 'fraction_numerical': 0.0025850926324859974, 'mean_word_length': 2.137837837837838, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '5986633', 'n_tokens_mistral': 748, 'n_tokens_neox': 741, 'n_words': 149}