diff --git a/plugins/arSolrPlugin/lib/arSolrExists.class.php b/plugins/arSolrPlugin/lib/arSolrExistsQuery.class.php similarity index 94% rename from plugins/arSolrPlugin/lib/arSolrExists.class.php rename to plugins/arSolrPlugin/lib/arSolrExistsQuery.class.php index 6dbbdfe653..6eca63ed5e 100644 --- a/plugins/arSolrPlugin/lib/arSolrExists.class.php +++ b/plugins/arSolrPlugin/lib/arSolrExistsQuery.class.php @@ -18,9 +18,9 @@ */ /** - * arSolrExists. + * arSolrExistsQuery. */ -class arSolrExists extends arSolrQuery +class arSolrExistsQuery extends arSolrQuery { /** * Construct exists query. diff --git a/plugins/arSolrPlugin/lib/arSolrMatchAll.class.php b/plugins/arSolrPlugin/lib/arSolrMatchAllQuery.class.php similarity index 93% rename from plugins/arSolrPlugin/lib/arSolrMatchAll.class.php rename to plugins/arSolrPlugin/lib/arSolrMatchAllQuery.class.php index af684b15bd..fb4984332b 100644 --- a/plugins/arSolrPlugin/lib/arSolrMatchAll.class.php +++ b/plugins/arSolrPlugin/lib/arSolrMatchAllQuery.class.php @@ -18,9 +18,9 @@ */ /** - * arSolrMatchAll. + * arSolrMatchAllQuery. */ -class arSolrMatchAll extends arSolrQuery +class arSolrMatchAllQuery extends arSolrQuery { /** * Params. diff --git a/plugins/arSolrPlugin/lib/arSolrNestedQuery.class.php b/plugins/arSolrPlugin/lib/arSolrNestedQuery.class.php new file mode 100644 index 0000000000..3399a007e1 --- /dev/null +++ b/plugins/arSolrPlugin/lib/arSolrNestedQuery.class.php @@ -0,0 +1,107 @@ +. + */ + +/** + * 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; + } +} diff --git a/plugins/arSolrPlugin/lib/arSolrRange.class.php b/plugins/arSolrPlugin/lib/arSolrRangeQuery.class.php similarity index 95% rename from plugins/arSolrPlugin/lib/arSolrRange.class.php rename to plugins/arSolrPlugin/lib/arSolrRangeQuery.class.php index aeca050226..d63994bb41 100644 --- a/plugins/arSolrPlugin/lib/arSolrRange.class.php +++ b/plugins/arSolrPlugin/lib/arSolrRangeQuery.class.php @@ -18,9 +18,9 @@ */ /** - * arSolrRange. + * arSolrRangeQuery. */ -class arSolrRange extends arSolrQuery +class arSolrRangeQuery extends arSolrQuery { /** * Constructor. diff --git a/plugins/arSolrPlugin/lib/arSolrTerm.class.php b/plugins/arSolrPlugin/lib/arSolrTermQuery.class.php similarity index 96% rename from plugins/arSolrPlugin/lib/arSolrTerm.class.php rename to plugins/arSolrPlugin/lib/arSolrTermQuery.class.php index aeb0400ba8..b392c8ad46 100644 --- a/plugins/arSolrPlugin/lib/arSolrTerm.class.php +++ b/plugins/arSolrPlugin/lib/arSolrTermQuery.class.php @@ -18,9 +18,9 @@ */ /** - * arSolrTerm. + * arSolrTermQuery. */ -class arSolrTerm extends arSolrQuery +class arSolrTermQuery extends arSolrQuery { /** * Calls setTerm with the given $term array