1 | <?php |
||||
2 | |||||
3 | namespace Mdiyakov\DoctrineSolrBundle\Query\Suggest\Solarium; |
||||
4 | |||||
5 | use Solarium\Core\Client\Request; |
||||
6 | use Solarium\Core\Query\RequestBuilder as BaseRequestBuilder; |
||||
7 | use Solarium\Core\Query\QueryInterface; |
||||
8 | |||||
9 | class RequestBuilder extends BaseRequestBuilder |
||||
0 ignored issues
–
show
Deprecated Code
introduced
by
![]() |
|||||
10 | { |
||||
11 | |||||
12 | /** |
||||
13 | * @param QueryInterface|Query $query $query |
||||
14 | * @return Request |
||||
15 | */ |
||||
16 | public function build(QueryInterface $query) |
||||
17 | { |
||||
18 | $request = parent::build($query); |
||||
19 | $request->addParam('suggest', 'true'); |
||||
20 | $request->addParam('suggest.q', $query->getQuery()); |
||||
0 ignored issues
–
show
The method
getQuery() does not exist on Solarium\Core\Query\QueryInterface . It seems like you code against a sub-type of Solarium\Core\Query\QueryInterface such as Solarium\QueryType\Select\Query\Query or Solarium\QueryType\Analysis\Query\AbstractQuery or Solarium\QueryType\Suggester\Query or Mdiyakov\DoctrineSolrBun...\Suggest\Solarium\Query .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
21 | |||||
22 | foreach ($query->getDictionaries() as $dictionary) { |
||||
0 ignored issues
–
show
The method
getDictionaries() does not exist on Solarium\Core\Query\QueryInterface . It seems like you code against a sub-type of Solarium\Core\Query\QueryInterface such as Mdiyakov\DoctrineSolrBun...\Suggest\Solarium\Query .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
23 | $request->addParam('suggest.dictionary', $dictionary); |
||||
24 | } |
||||
25 | |||||
26 | $request->addParam('suggest.count', $query->getCount()); |
||||
0 ignored issues
–
show
The method
getCount() does not exist on Solarium\Core\Query\QueryInterface . It seems like you code against a sub-type of Solarium\Core\Query\QueryInterface such as Solarium\QueryType\Suggester\Query or Mdiyakov\DoctrineSolrBun...\Suggest\Solarium\Query .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
27 | $request->addParam('suggest.cfq', $query->getContextFieldQuery()); |
||||
0 ignored issues
–
show
The method
getContextFieldQuery() does not exist on Solarium\Core\Query\QueryInterface . It seems like you code against a sub-type of Solarium\Core\Query\QueryInterface such as Mdiyakov\DoctrineSolrBun...\Suggest\Solarium\Query .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
28 | |||||
29 | return $request; |
||||
30 | } |
||||
31 | } |