-
Notifications
You must be signed in to change notification settings - Fork 1
/
AElasticSearchResult.php
executable file
·75 lines (66 loc) · 1.44 KB
/
AElasticSearchResult.php
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* Represents an elastic search result
* @author Charles Pick
* @author Stratos Gerakakis
* @package packages.elasticSearch
*/
class AElasticSearchResult extends AElasticSearchDocument {
/**
* The position in the search results
* @var integer
*/
protected $_position;
/**
* The elastic search criteria
* @var AElasticSearchCriteria
*/
protected $_criteria;
/**
* Holds the document score
* @var integer
*/
protected $_score;
/**
* Sets the document score
* @param integer $score
*/
public function setScore($score) {
$this->_score = $score;
}
/**
* Gets the score for this document
* @return integer
*/
public function getScore() {
return $this->_score;
}
/**
* Sets the elastic search criteria for this search result
* @param AElasticSearchCriteria $criteria the elastic search criteria
*/
public function setCriteria($criteria) {
$this->_criteria = $criteria;
}
/**
* Gets the elastic search criteria for this search result
* @return AElasticSearchCriteria the elastic search criteria
*/
public function getCriteria() {
return $this->_criteria;
}
/**
* Sets the position in the search results
* @param integer $position
*/
public function setPosition($position) {
$this->_position = $position;
}
/**
* Gets the position in the search results
* @return integer the position in the search results
*/
public function getPosition() {
return $this->_position;
}
}