Skip to content

Commit ce00129

Browse files
committed
Rename query classes.
1 parent b484d3d commit ce00129

5 files changed

+115
-8
lines changed

plugins/arSolrPlugin/lib/arSolrExists.class.php plugins/arSolrPlugin/lib/arSolrExistsQuery.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
*/
1919

2020
/**
21-
* arSolrExists.
21+
* arSolrExistsQuery.
2222
*/
23-
class arSolrExists extends arSolrQuery
23+
class arSolrExistsQuery extends arSolrQuery
2424
{
2525
/**
2626
* Construct exists query.

plugins/arSolrPlugin/lib/arSolrMatchAll.class.php plugins/arSolrPlugin/lib/arSolrMatchAllQuery.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
*/
1919

2020
/**
21-
* arSolrMatchAll.
21+
* arSolrMatchAllQuery.
2222
*/
23-
class arSolrMatchAll extends arSolrQuery
23+
class arSolrMatchAllQuery extends arSolrQuery
2424
{
2525
/**
2626
* Params.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Access to Memory (AtoM) software.
5+
*
6+
* Access to Memory (AtoM) is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU Affero General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* Access to Memory (AtoM) is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public License
17+
* along with Access to Memory (AtoM). If not, see <http://www.gnu.org/licenses/>.
18+
*/
19+
20+
/**
21+
* arSolrNestedQuery.
22+
*/
23+
class arSolrNestedQuery extends arSolrQuery
24+
{
25+
26+
/**
27+
* Adds field to mlt query.
28+
*
29+
* @param string $path Nested object path
30+
*
31+
* @return $this
32+
*/
33+
public function setPath(string $path): self
34+
{
35+
return $this->setParam('path', $path);
36+
}
37+
38+
/**
39+
* Sets nested query.
40+
*
41+
* @return $this
42+
*/
43+
public function setQuery($query): self
44+
{
45+
return $this->setParam('query', $query);
46+
}
47+
48+
/**
49+
* Set score method.
50+
*
51+
* @param string $scoreMode options: avg, total, max and none
52+
*
53+
* @return $this
54+
*/
55+
public function setScoreMode(string $scoreMode = 'avg'): self
56+
{
57+
return $this->setParam('score_mode', $scoreMode);
58+
}
59+
60+
/**
61+
*
62+
*
63+
* @param string $
64+
*
65+
* @return $this
66+
*/
67+
public function addSort()
68+
{
69+
return;
70+
}
71+
72+
/**
73+
*
74+
*
75+
* @param string $
76+
*
77+
* @return $this
78+
*/
79+
public function setSort()
80+
{
81+
return;
82+
}
83+
84+
/**
85+
*
86+
*
87+
* @param string $
88+
*
89+
* @return $this
90+
*/
91+
public function setTerm()
92+
{
93+
return;
94+
}
95+
96+
/**
97+
*
98+
*
99+
* @param string $
100+
*
101+
* @return $this
102+
*/
103+
public function setFilter()
104+
{
105+
return;
106+
}
107+
}

plugins/arSolrPlugin/lib/arSolrRange.class.php plugins/arSolrPlugin/lib/arSolrRangeQuery.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
*/
1919

2020
/**
21-
* arSolrRange.
21+
* arSolrRangeQuery.
2222
*/
23-
class arSolrRange extends arSolrQuery
23+
class arSolrRangeQuery extends arSolrQuery
2424
{
2525
/**
2626
* Constructor.

plugins/arSolrPlugin/lib/arSolrTerm.class.php plugins/arSolrPlugin/lib/arSolrTermQuery.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
*/
1919

2020
/**
21-
* arSolrTerm.
21+
* arSolrTermQuery.
2222
*/
23-
class arSolrTerm extends arSolrQuery
23+
class arSolrTermQuery extends arSolrQuery
2424
{
2525
/**
2626
* Calls setTerm with the given $term array

0 commit comments

Comments
 (0)