1

ドキュメントをエラスティック検索にインデックス化するためにmongoosasticをセットアップしました。問題は、スキーマ セットにもかかわらず、すべてのフィールドがインデックス化されていることです。

私のスキーマ:

id: { type: String, index: true },
title: String,
title_lower: { type: String, es_indexed: true, es_boost: 2.0 },
slug: String,
city: { type: String, es_indexed: true },
country: { type: String, es_indexed: true },
genre: [{ type: String, es_indexed: true }],
description: { type: String, es_indexed: true },
gallery: [{ title: String, images: { thumbnail: String, medium: String, full: String }}],
date: { start: String, end: String },
price: { min: Number, max: Number },
temperature: Number,
weather: String,
comments: [CommentSchema],
lineup: { type: [LineupSchema], es_indexed: true }

ここでは、title_lower、都市、ジャンル、説明、およびラインナップのみをインデックス化します。しかし、http://localhost:9200/events/_searchのようにエラスティックをチェックすると、すべてのフィールドが _source の下に追加されていることがわかります。

4

0 に答える 0