<commit_before><?php
/*
 * Copyright 2018 <NAME>
 *
 * Licensed under the Apache License, version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

/**
 * resto Default Model
 * 
 * [IMPORTANT] Every model *MUST* extend DefaultModel
 */
class DefaultModel extends RestoModel
{

    /**
     * Constructor
     * 
     * @param array $options
     */
    public function __construct($options = array())
    {
        parent::__construct($options);

        /*
         * Extend search filters with date related filters
         */
        $this->searchFilters = array_merge($this->searchFilters, array(

            // 
            'resto:day' => array(
                'key' => 'normalized_hashtags',
                'osKey' => 'day',
                'prefix' => 'day',
                'operation' => 'keywords',
                'title' => 'Day of month in two digit (i.e. between 1 and 31)',
                'pattern' => '^[0-3][0-9]$',
                'options' => 'auto'
            ),

            'eo:productType' => array(
                'key' => 'normalized_hashtags',
                'osKey' => 'productType',
                'prefix' => 'productType',
                'operation' => 'keywords',
                'title' => 'A string identifying the entry type (e.g. ER02_SAR_IM__0P, MER_RR__1P, SM_SLC__1S, GES_DISC_AIRH3STD_V005)',
                'options' => 'auto'
            ),<commit_msg>Add direct search filters for day,month,year,season and location in queryParams and OpenSearch Description<commit_after><?php
/*
 * Copyright 2018 <NAME>
 *
 * Licensed under the Apache License, version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

/**
 * resto Default Model
 * 
 * [IMPORTANT] Every model *MUST* extend DefaultModel
 */
class DefaultModel extends RestoModel
{

    /**
     * Constructor
     * 
     * @param array $options
     */
    public function __construct($options = array())
    {
        parent::__construct($options);

        /*
         * Extend search filters with date related filters
         */
        $this->searchFilters = array_merge($this->searchFilters, array(

            // Year
            'time:year' => array(
                'key' => 'normalized_hashtags',
                'osKey' => 'year',
                'prefix' => 'year',
                'operation' => 'keywords',
                'title' => 'Year in YYYY format',
                'pattern' => '^[0-9]{4}$',
                'options' => 'auto'
            ),

            // Month of year
            'time:month' => array(
                'key' => 'normalized_hashtags',
                'osKey' => 'month',
                'prefix' => 'month',
                'operation' => 'keywords',
                'title' => 'Month of the year in two digit (i.e. between 01 and 12)',
                'pattern' => '^[0-1][0-2]$',
                'options' => 'auto'
            ),

            // Day of month
            'time:day' => array(
                'key' => 'normalized_hashtags',
                'osKey' => 'day',
                'prefix' => 'day',
                'operation' => 'keywords',
                'title' => 'Day of month in two digit (i.e. between 1 and 31)',
                'pattern' => '^[0-3][0-9]$',
                'options' => 'auto'
            ),

            // Season (iTag needed)
            'resto:season' => array(
                'key' => 'normalized_hashtags',
                'osKey' => 'season',
                'prefix' => 'season',
                'operation' => 'keywords',
                'title' => 'Season name',
                'options' => 'auto'
            ),

            // Location (iTag needed)
            'resto:location' => array(
                'key' => 'normalized_hashtags',
                'osKey' => 'location',
                'prefix' => 'location',
                'operation' => 'keywords',
                'title' => 'Location',
                'options' => 'auto'
            ),
{'fraction_non_alphanumeric': 0.1312282140660242, 'fraction_numerical': 0.01025220422390814, 'mean_word_length': 1.7312430011198208, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 62, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6068094', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1287, 'n_words': 404}