mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-19 16:03:14 +00:00
Merge branch 'PHRAS-3261-add-searchzone-mapboxGl' of https://github.com/alchemy-fr/Phraseanet into PHRAS-3261-add-searchzone-mapboxGl
This commit is contained in:
@@ -33,6 +33,8 @@ class ElasticsearchOptions
|
||||
private $minScore;
|
||||
/** @var bool */
|
||||
private $highlight;
|
||||
/** @var int */
|
||||
private $maxResultWindow;
|
||||
/** @var string */
|
||||
private $populateOrder;
|
||||
/** @var string */
|
||||
@@ -58,6 +60,7 @@ class ElasticsearchOptions
|
||||
'replicas' => 0,
|
||||
'minScore' => 4,
|
||||
'highlight' => true,
|
||||
'max_result_window' => 500000,
|
||||
'populate_order' => self::POPULATE_ORDER_RID,
|
||||
'populate_direction' => self::POPULATE_DIRECTION_DESC,
|
||||
'activeTab' => null,
|
||||
@@ -73,6 +76,7 @@ class ElasticsearchOptions
|
||||
$self->setReplicas($options['replicas']);
|
||||
$self->setMinScore($options['minScore']);
|
||||
$self->setHighlight($options['highlight']);
|
||||
$self->setMaxResultWindow($options['max_result_window']);
|
||||
$self->setPopulateOrder($options['populate_order']);
|
||||
$self->setPopulateDirection($options['populate_direction']);
|
||||
$self->setActiveTab($options['activeTab']);
|
||||
@@ -96,6 +100,7 @@ class ElasticsearchOptions
|
||||
'replicas' => $this->replicas,
|
||||
'minScore' => $this->minScore,
|
||||
'highlight' => $this->highlight,
|
||||
'maxResultWindow' => $this->maxResultWindow,
|
||||
'populate_order' => $this->populateOrder,
|
||||
'populate_direction' => $this->populateDirection,
|
||||
'activeTab' => $this->activeTab,
|
||||
@@ -220,6 +225,22 @@ class ElasticsearchOptions
|
||||
$this->highlight = $highlight;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMaxResultWindow()
|
||||
{
|
||||
return $this->maxResultWindow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $maxResultWindow
|
||||
*/
|
||||
public function setMaxResultWindow($maxResultWindow)
|
||||
{
|
||||
$this->maxResultWindow = (int)$maxResultWindow;
|
||||
}
|
||||
|
||||
public function setAggregableFieldLimit($key, $value)
|
||||
{
|
||||
if(is_null($this->getAggregableField($key))) {
|
||||
@@ -476,4 +497,4 @@ class ElasticsearchOptions
|
||||
return $this->populateDirection;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user