summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Rescore/AbstractRescore.php
blob: cb6c7ccec79912fe6693383c499ede74a5fcf791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php

namespace Elastica\Rescore;
use Elastica\Param;

/**
 * Abstract rescore object. Should be extended by all rescorers.
 *
 * @category Xodoa
 * @package Elastica
 * @author Jason Hu <mjhu91@gmail.com>
 * @link http://www.elasticsearch.org/guide/reference/api/search/rescore/
 */
abstract class AbstractRescore extends Param
{
	/**
	 * Overridden to return rescore as name
     *
     * @return string name
     */
    protected function _getBaseName()
    {
        return 'rescore';
    }

    /**
     * Sets window_size
     *
     * @param int $size
     * @return \Elastica\Rescore
     */
    public function setWindowSize($size)
    {
        return $this->setParam('window_size', $size);
    }
}