public function getBasicEsParams($getIdIfPossible = true, $getSourceIfPossible = false, $getTimestampIfPossible = false, $limit = null, $offset = null)
{
$params = array('index' => $this->getIndexName(), 'type' => $this->getTypeName());
if ($getIdIfPossible && $this->getKey()) {
$params['id'] = $this->getKey();
}
$fields = $this->buildFieldsParameter($getSourceIfPossible, $getTimestampIfPossible);
if (!empty($fields)) {
$params['fields'] = implode(',', $fields);
}
if (is_numeric($limit)) {
$params['size'] = $limit;
}
if (is_numeric($offset)) {
$params['from'] = $offset;
}
return $params;
}