簡體   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