|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace PSolr\Request; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* @see http://wiki.apache.org/solr/LukeRequestHandler |
|
7
|
|
|
* |
|
8
|
|
|
* @method \PSolr\Response\Luke sendRequest(\PSolr\Request\SolrClient $solr, $headers = null, array $options = array()) |
|
9
|
|
|
*/ |
|
10
|
|
|
class Luke extends SolrRequest |
|
11
|
|
|
{ |
|
12
|
|
|
/** |
|
13
|
|
|
* @var string |
|
14
|
|
|
*/ |
|
15
|
|
|
protected $handlerName = 'luke'; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* $var string |
|
19
|
|
|
*/ |
|
20
|
|
|
protected $responseClass = '\PSolr\Response\Luke'; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* @param int $numTerms |
|
24
|
|
|
* |
|
25
|
|
|
* @return \PSolr\Request\Luke |
|
26
|
|
|
* |
|
27
|
|
|
* @see http://wiki.apache.org/solr/LukeRequestHandler#numTerms |
|
28
|
|
|
*/ |
|
29
|
|
|
public function setNumTerms($numTerms) |
|
30
|
|
|
{ |
|
31
|
|
|
return $this->set('numTerms', $numTerms); |
|
32
|
|
|
} |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* @param string|array $fieldList |
|
36
|
|
|
* |
|
37
|
|
|
* @return \PSolr\Request\Luke |
|
38
|
|
|
* |
|
39
|
|
|
* @see http://wiki.apache.org/solr/LukeRequestHandler#fl |
|
40
|
|
|
*/ |
|
41
|
|
|
public function setFieldList($fieldList) |
|
42
|
|
|
{ |
|
43
|
|
|
return $this->set('fl', join(',', (array) $fieldList)); |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* @param string $id |
|
48
|
|
|
* |
|
49
|
|
|
* @return \PSolr\Request\Luke |
|
50
|
|
|
* |
|
51
|
|
|
* @see http://wiki.apache.org/solr/LukeRequestHandler#id |
|
52
|
|
|
*/ |
|
53
|
|
|
public function setId($id) |
|
54
|
|
|
{ |
|
55
|
|
|
return $this->set('id', $id); |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* @param string $id |
|
60
|
|
|
* |
|
61
|
|
|
* @return \PSolr\Request\Luke |
|
62
|
|
|
* |
|
63
|
|
|
* @see http://wiki.apache.org/solr/LukeRequestHandler#docId |
|
64
|
|
|
*/ |
|
65
|
|
|
public function setDocumentId($id) |
|
66
|
|
|
{ |
|
67
|
|
|
return $this->set('docId', $id); |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
/** |
|
71
|
|
|
* @param string $item |
|
72
|
|
|
* |
|
73
|
|
|
* @return \PSolr\Request\Luke |
|
74
|
|
|
* |
|
75
|
|
|
* @see http://wiki.apache.org/solr/LukeRequestHandler#show |
|
76
|
|
|
*/ |
|
77
|
|
|
public function setShow($item) |
|
78
|
|
|
{ |
|
79
|
|
|
return $this->set('show', $item); |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* @param bool $report |
|
84
|
|
|
* |
|
85
|
|
|
* @return \PSolr\Request\Luke |
|
86
|
|
|
* |
|
87
|
|
|
* @see http://wiki.apache.org/solr/LukeRequestHandler#reportDocCount |
|
88
|
|
|
*/ |
|
89
|
|
|
public function reportDocCount($report) |
|
90
|
|
|
{ |
|
91
|
|
|
return $this->set('reportDocCount', $report); |
|
92
|
|
|
} |
|
93
|
|
|
} |
|
94
|
|
|
|