From a5bb117ae7274de41f28b877f6c4a166b4218699 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Fri, 15 Jan 2016 14:36:53 -0800 Subject: [PATCH] #1: Don't analyze the artist field in Elasticsearch. --- .../migrations/2016_01_14_021607_setup_elasticsearch.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/database/migrations/2016_01_14_021607_setup_elasticsearch.php b/database/migrations/2016_01_14_021607_setup_elasticsearch.php index 364da970..c6869aec 100644 --- a/database/migrations/2016_01_14_021607_setup_elasticsearch.php +++ b/database/migrations/2016_01_14_021607_setup_elasticsearch.php @@ -18,10 +18,8 @@ * along with this program. If not, see . */ -use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; use Poniverse\Ponyfm\Console\Commands\RebuildSearchIndex; -use Poniverse\Ponyfm\Models\Track; class SetupElasticsearch extends Migration { @@ -43,7 +41,7 @@ class SetupElasticsearch extends Migration 'dynamic' => 'strict', 'properties' => [ 'title' => ['type' => 'string'], - 'artist' => ['type' => 'string'], + 'artist' => ['type' => 'string', 'index' => 'not_analyzed'], 'published_at' => ['type' => 'date'], 'genre' => ['type' => 'string', 'index' => 'not_analyzed'], 'track_type' => ['type' => 'string', 'index' => 'not_analyzed'], @@ -60,7 +58,7 @@ class SetupElasticsearch extends Migration 'dynamic' => 'strict', 'properties' => [ 'title' => ['type' => 'string'], - 'artist' => ['type' => 'string'], + 'artist' => ['type' => 'string', 'index' => 'not_analyzed'], // This field is intended to be used as an array. // Note that all Elasticsearch fields can technically be used as arrays.