Skip to content

Commit

Permalink
Rename query classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
melaniekung committed May 31, 2024
1 parent b484d3d commit ce00129
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

/**
* arSolrExists.
* arSolrExistsQuery.
*/
class arSolrExists extends arSolrQuery
class arSolrExistsQuery extends arSolrQuery
{
/**
* Construct exists query.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

/**
* arSolrMatchAll.
* arSolrMatchAllQuery.
*/
class arSolrMatchAll extends arSolrQuery
class arSolrMatchAllQuery extends arSolrQuery
{
/**
* Params.
Expand Down
107 changes: 107 additions & 0 deletions plugins/arSolrPlugin/lib/arSolrNestedQuery.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?php

/*
* This file is part of the Access to Memory (AtoM) software.
*
* Access to Memory (AtoM) is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Access to Memory (AtoM) is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Access to Memory (AtoM). If not, see <http://www.gnu.org/licenses/>.
*/

/**
* arSolrNestedQuery.
*/
class arSolrNestedQuery extends arSolrQuery
{

/**
* Adds field to mlt query.
*
* @param string $path Nested object path
*
* @return $this
*/
public function setPath(string $path): self
{
return $this->setParam('path', $path);
}

/**
* Sets nested query.
*
* @return $this
*/
public function setQuery($query): self
{
return $this->setParam('query', $query);
}

/**
* Set score method.
*
* @param string $scoreMode options: avg, total, max and none
*
* @return $this
*/
public function setScoreMode(string $scoreMode = 'avg'): self
{
return $this->setParam('score_mode', $scoreMode);
}

/**
*
*
* @param string $
*
* @return $this
*/
public function addSort()
{
return;
}

/**
*
*
* @param string $
*
* @return $this
*/
public function setSort()
{
return;
}

/**
*
*
* @param string $
*
* @return $this
*/
public function setTerm()
{
return;
}

/**
*
*
* @param string $
*
* @return $this
*/
public function setFilter()
{
return;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

/**
* arSolrRange.
* arSolrRangeQuery.
*/
class arSolrRange extends arSolrQuery
class arSolrRangeQuery extends arSolrQuery
{
/**
* Constructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
*/

/**
* arSolrTerm.
* arSolrTermQuery.
*/
class arSolrTerm extends arSolrQuery
class arSolrTermQuery extends arSolrQuery
{
/**
* Calls setTerm with the given $term array
Expand Down

0 comments on commit ce00129

Please sign in to comment.