0

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

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

但是,我得到了这个结果: 在此处输入图像描述

4

1 回答 1

1

正如错误所说,它与 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

于 2020-11-20T03:09:14.147 回答