PHRAS-3023_slow-query-while-indexing_4.1

- fix bound limit depending on order/direction options
- add index on dbox:record.moddate
This commit is contained in:
Jean-Yves Gaulier
2020-04-09 19:11:08 +02:00
parent 3d5a6efcc7
commit cb6a781b02
5 changed files with 177 additions and 43 deletions

View File

@@ -38,7 +38,7 @@ class ElasticsearchOptions
/** @var string */
private $populateDirection;
/** @var int[] */
/** @var int[][] */
private $_customValues = [];
private $activeTab;
@@ -437,15 +437,9 @@ class ElasticsearchOptions
/**
* @return string
*/
public function getPopulateOrderAsSQL()
public function getPopulateOrder()
{
static $orderAsColumn = [
self::POPULATE_ORDER_RID => "`record_id`",
self::POPULATE_ORDER_MODDATE => "`moddate`",
];
// populateOrder IS one of the keys (ensured by setPopulateOrder)
return $orderAsColumn[$this->populateOrder];
return $this->populateOrder;
}
/**
@@ -465,6 +459,14 @@ class ElasticsearchOptions
}
/**
* @return string
*/
public function getPopulateDirection()
{
return $this->populateDirection;
}
/**
* @return string
*/
@@ -474,4 +476,4 @@ class ElasticsearchOptions
return $this->populateDirection;
}
}
}