blob: 4f5c0f93c0e892b089277d17065a9b90a5c50a47 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?php
namespace Elastica\Filter;
/**
* geo_shape filter.
*
* Filter pre-indexed shape definitions
*
* @author Bennie Krijger <benniekrijger@gmail.com>
*
* @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-filter.html
*/
abstract class AbstractGeoShape extends AbstractFilter
{
const RELATION_INTERSECT = 'intersects';
const RELATION_DISJOINT = 'disjoint';
const RELATION_CONTAINS = 'within';
/**
* @var string
*
* elasticsearch path of the pre-indexed shape
*/
protected $_path;
/**
* @var string
*
* the relation of the 2 shaped: intersects, disjoint, within
*/
protected $_relation = self::RELATION_INTERSECT;
/**
* @param string $relation
*
* @return $this
*/
public function setRelation($relation)
{
$this->_relation = $relation;
return $this;
}
/**
* @return string
*/
public function getRelation()
{
return $this->_relation;
}
}
|