/
Terms.php
52 lines (44 loc) · 1.25 KB
/
Terms.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
<?php
namespace Solarium\Component;
use Solarium\Component\RequestBuilder\Terms as RequestBuilder;
use Solarium\Component\ResponseParser\Terms as ResponseParser;
use Solarium\Component\ComponentTraits\TermsTrait;
/**
* Terms component.
*
* A terms query provides access to the indexed terms in a field and the number of documents that match each term.
* This can be useful for doing auto-suggest or other things that operate at the term level instead of the search
* or document level. Retrieving terms in index order is very fast since the implementation directly uses Lucene's
* TermEnum to iterate over the term dictionary.
*/
class Terms extends AbstractComponent implements TermsInterface
{
use TermsTrait;
/**
* Get component type.
*
* @return string
*/
public function getType()
{
return ComponentAwareQueryInterface::COMPONENT_TERMS;
}
/**
* Get a requestbuilder for this query.
*
* @return RequestBuilder
*/
public function getRequestBuilder()
{
return new RequestBuilder();
}
/**
* Get a response parser for this query.
*
* @return ResponseParser
*/
public function getResponseParser()
{
return new ResponseParser();
}
}