<commit_before><?php

namespace Coyote\Services\Elasticsearch\Builders\Job;

use Coyote\Services\Elasticsearch\MultiMatch;
use Coyote\Services\Elasticsearch\QueryBuilder;
use Coyote\Services\Elasticsearch\Sort;

class FbBuilder extends QueryBuilder
{
    /**
     * @var string
     */
    protected $language;

    /**
     * @param string $language
     */
    public function setLanguage($language)
    {
        $this->language = strtolower($language);
    }

    /**
     * @return array
     */
    public function build()
    {
        $this->must(new MultiMatch($this->language, ['title^3', 'tags.original^2']));
        $this->sort(new Sort('score', 'desc'));
        $this->size(0, 100);

        return parent::build();
    }
}<commit_msg>generowanie ofert pracy tylko z ostatniego tygodnia<commit_after><?php

namespace Coyote\Services\Elasticsearch\Builders\Job;

use Coyote\Services\Elasticsearch\Filters\Range;
use Coyote\Services\Elasticsearch\MultiMatch;
use Coyote\Services\Elasticsearch\QueryBuilder;
use Coyote\Services\Elasticsearch\Sort;

class FbBuilder extends QueryBuilder
{
    /**
     * @var string
     */
    protected $language;

    /**
     * @param string $language
     */
    public function setLanguage($language)
    {
        $this->language = strtolower($language);
    }

    /**
     * @return array
     */
    public function build()
    {
        $this->must(new MultiMatch($this->language, ['title^3', 'tags.original^2']));
        $this->must(new Range('boost_at', ['gt' => 'now-7d']));
        $this->sort(new Sort('score', 'desc'));
        $this->size(0, 100);

        return parent::build();
    }
}
{'fraction_non_alphanumeric': 0.15081768625075712, 'fraction_numerical': 0.007874015748031496, 'mean_word_length': 2.914691943127962, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '2763352', 'n_tokens_mistral': 523, 'n_tokens_neox': 511, 'n_words': 94}