1
截至目前,我正在使用NEST将数据索引到Elasticsearch中。 当我试图领域的指标一个是not_analyzed
使用下面的代码:如何添加一个not_analyzed字段到Elasticsearch中
var settings = new ConnectionSettings(
node,
defaultIndex: "resourceid5_analyzed1"
)
.SetDefaultPropertyNameInferrer(p => p);
var client = new ElasticClient(settings);
var response = client.Map<GoodDataAttribute>(m => m.MapFromAttributes()
.Properties(props => props
.String(s1 => s1
.Name(p => p.ResourceGroup)
.Analyzer("keyword")
.IncludeInAll(false)
.Index(FieldIndexOption.NotAnalyzed)
.OmitNorms(true))));
我已经使用SetDefaultPropertyNameInferrer
禁用的弹性性质 的骆驼情况下,我提前
截至目前指数还没有被创建。 var settings = new ConnectionSettings( node, defaultIndex:“resourceid5_analyzed1” ) .SetDefaultPropertyNameInferrer(p => p); 此处default-index已创建索引。 即使那么字段是not_analyzed。 – AkankshaGupta