1

次のようなスキーマを持つ mongooseオブジェクトがあり、 timestampsを使用して、createdAt および updatedAt フィールドにデータを入力しています。mongoosasticを使用して、これらをエラスティック検索でインデックス付けしています。

var mongoose = require("mongoose");
var employeeSchema = new mongoose.Schema(
    {
        name: {
                 type: String
                 es_indexed: true,
                 es_index:"analyzed"
              },
        managerId: {type: mongoose.Schema.Types.ObjectId},
        details:{},
        email: {
                 type: String
                 es_indexed: true,
                 es_index:"analyzed"
              },
        phone: {
                 type: Number
                 es_indexed: true,
                 es_index:"analyzed"
              }
    },
    {
        timestamps: true
    });

エラスティック検索でもインデックスを作成したいのですupdatedAtが、mongoosastic でそれを行う方法がわかりません。これを行うためのこれらの特定のオプションを教えてください。

4

1 に答える 1