From 8eed950db878f461c7b5daa6986967e812232ec3 Mon Sep 17 00:00:00 2001 From: uleus Date: Fri, 5 Feb 2021 10:23:36 +0100 Subject: [PATCH] remove phrase field --- .../Indexing/IndexManagementItem.cs | 6 +----- .../Indexing/IndexPropertyItem.cs | 12 ++---------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Elasticsearch/Search.Elasticsearch/Indexing/IndexManagementItem.cs b/Elasticsearch/Search.Elasticsearch/Indexing/IndexManagementItem.cs index 02bbf9e..c29fe6d 100644 --- a/Elasticsearch/Search.Elasticsearch/Indexing/IndexManagementItem.cs +++ b/Elasticsearch/Search.Elasticsearch/Indexing/IndexManagementItem.cs @@ -21,11 +21,7 @@ public override async Task CreateIndex(IElasticClient aClie .Properties(ps => ps .Text(p => p .Name("Market") - .Fields(fs => fs - .Text(f => f - .Name("phrase") - .Analyzer("english") - ) + .Fields(fs => fs .Keyword(f => f .Name("keyword") ) diff --git a/Elasticsearch/Search.Elasticsearch/Indexing/IndexPropertyItem.cs b/Elasticsearch/Search.Elasticsearch/Indexing/IndexPropertyItem.cs index 09b0a49..a521a7f 100644 --- a/Elasticsearch/Search.Elasticsearch/Indexing/IndexPropertyItem.cs +++ b/Elasticsearch/Search.Elasticsearch/Indexing/IndexPropertyItem.cs @@ -21,11 +21,7 @@ public override async Task CreateIndex(IElasticClient aClie .Properties( ps => ps .Text(p => p .Name("Market") - .Fields(fs => fs - .Text(f => f - .Name("phrase") - .Analyzer("english") - ) + .Fields(fs => fs .Keyword(f => f .Name("keyword") ) @@ -35,11 +31,7 @@ public override async Task CreateIndex(IElasticClient aClie ) .Text( p => p .Name("City") - .Fields( fs => fs - .Text(f => f - .Name("phrase") - .Analyzer("english") - ) + .Fields( fs => fs .Keyword(f => f .Name("keyword") )