繁体   English   中英

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

[英]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级别相同)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM