Commit e1ad58d0 authored by Son Nguyen's avatar Son Nguyen
Browse files

Add new index for the field 'itemid' on 'search_elasticsearch_queue'



Bug 1415246

Change-Id: I863596d10826fdd606b92a38bf89182b55a1717f
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent b58ae22d
......@@ -15,6 +15,9 @@
<KEYS>
<KEY NAME="search_elasticsearch_queuepk" TYPE="primary" FIELDS="id" />
</KEYS>
<INDEXES>
<INDEX NAME="itemidix" UNIQUE="false" FIELDS="itemid"/>
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
<?php
/**
*
* @package mahara
* @subpackage elasticsearch
* @author Catalyst IT Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
* @copyright For copyright information on Mahara, please see the README file distributed with this software.
*
*/
defined('INTERNAL') || die();
function xmldb_search_elasticsearch_upgrade($oldversion=0) {
if ($oldversion < 2015012800) {
// Adding indices on the table search_elasticsearch_queue
$table = new XMLDBTable('search_elasticsearch_queue');
$index = new XMLDBIndex('itemidix');
$index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('itemid'));
add_index($table, $index);
}
return true;
}
......@@ -13,5 +13,5 @@ defined('INTERNAL') || die();
$config = new stdClass();
$config->name = 'elasticsearch';
$config->version = 2013030503;
$config->release = '1.0.0';
$config->version = 2015012800;
$config->release = '1.0.1';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment