我目前正在使用 Elastic4s v5.0,它仍然具有用于以多种方式索引字段的多字段类型。
elasticClient.execute(createIndex("foo") mappings (
mapping("bar").as(
multiField("baz").as(
textField("baz") analyzer myAnalyzer,
textField("original") index NotAnalyzed
)
)
)
但是,我收到以下错误:
No handler for type [multi_field] declared on field []
答案ElasticSearch 5: MapperParserException with multi_field and documentation here https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html说要使用“字段”,但我找不到如何在 elastic4s 中执行此操作。