在 ArangoJS 中创建 ArangoSearchView 时如何自定义 link 属性

How to customize link properties when creating ArangoSearchView in ArangoJS

我尝试在 arangojs 中创建一个 ArangoSearchView,但我不知道如何设置视图属性。 这是我的代码:

const link = {
    includeAllFields: true,
    fields: { val: { analyzers: ["text_en"] } },
    storeValues: "val"
};
const view = _db.view(`${_viewName}`);
await view.create({ links: {mergeDB : link } });

但是,我得到了这个结果:

正如错误所说,问题出在 storeValue 字段上

根据文档,该值应为 none(默认值)或 id

storeValues (optional; type: string; default: "none")

This property controls how the view should keep track of the attribute values. Valid values are:

none: Do not store value meta data in the View.
id: Store information about value presence to allow use of the EXISTS() function.

Not to be confused with storedValues, which stores attribute values in the View index.

请注意,还有一个名为 storedValues 的参数,但它是顶级字段(与 links 相同级别)