Skip to content
  • Robert Lyon's avatar
    Bug 1734006: Elasticsearch to work with either elasticsearch 5+ or 6+ server · 9e59e594
    Robert Lyon authored
    
    
    This patch reworks how we do index mapping.
    
    Old way: We mapped different types eg usr, view separately
    New way: We map one 'doc' type and merge the existing mapping types to
    that.
    We can do this by adding a 'type' field to the mapping and making the
    elasticsearch internal '_id' be populated with the type + id from
    mahara, eg usr7 vs view7.
    
    Also instead of using the '_all' mapping (which is obsoleted in 6.x)
    we create an explicit 'catch_all' field that we populate via 'copy_to'
    from other fields
    
    behatnotneeded
    
    Change-Id: Id0b89a011633fe7184518c0dc0473514729894f3
    Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
    9e59e594