简体   繁体   English

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

[英]How to customize link properties when creating ArangoSearchView in ArangoJS

I try to create an ArangoSearchView in arangojs, but I don't know how to set up view properties.我尝试在 arangojs 中创建一个 ArangoSearchView,但我不知道如何设置视图属性。 Here is my code:这是我的代码:

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

However, I got this result:但是,我得到了这个结果: 在此处输入图片说明

As the error says the issue it's with the storeValue field由于错误说明问题在于 storeValue 字段

According the docs the value should be either none (default) or id根据文档,该值应为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.

Note that there is other parameter called storedValues but it's a top level field (same level as links )请注意,还有一个名为storedValues参数,但它是顶级字段(与links级别相同)

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

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