如何删除FollowRecursive中的输出限制?

时间:2017-06-17 02:00:19

标签: graph-databases gremlin cayley

我使用FollowRecursive查询遍历图表,其中每个节点都与谓词" next"连接。问题是我永远不会超过99来源=>目标映射。

为什么输出仅限于100个{来源:N,目标:M}个对象?

查询如下所示(当然所有变量都已定义):

var chain_pred = "next";
var c1 = g.M().Out(chain_pred);
var start_node = "begin";

g.V(start_node).FollowRecursive(c1).ForEach( function(v){
  g.V(v.id).Out(chain_pred).ForEach( function(t){
    var node = {
      source: v.id,
      target: t.id
    }

    g.Emit(node)
  })
})

我用java脚本递归调用(在DepthFirstSearch中)编写了相同的查询,结果证明我不能获得超过100个对象。我可以得到预期的输出直到深度3。在深度4处,我开始在开始节点中丢失整个树分支。这意味着在递归后肯定会有一个上限,在100个结果之后杀死查询。

如何删除此限制?

1 个答案:

答案 0 :(得分:0)

有点晚了,但无论如何我都会回答:

var lastsel;

 jQuery("#AcOpenDataGrid").jqGrid({
                    url: '/Admin/Role/GetMappedMenus',
                    viewrecords: true, sortname: 'Code', sortorder: "desc",
                    colNames: [
                    "Code",
                    "MenuName",
                    "Allow"
                    ],
                    colModel: [
                     { name: 'Code', width: 10, key: true, align: 'center', hidden: true },
                     { name: 'MenuName', index: 'MenuName', width: 60, search: true, searchoptions: JQ_sopt_string, align: 'left' },
                     { name: 'Allow', index: 'Allow', width: 30, editable: true,edittype:'checkbox',editoptions: { value:"True:False" },formatter:'checkbox', formatoptions: {disabled : false}  ,search: true, searchoptions: JQ_sopt_string, align: 'center' },
                    ],
                    height: '500',
                    autowidth: true,
                    rowList: JQ_Paging_Opt,
                    rowNum: JQ_RowNum_Opt,
                    pager: pager_selector,
                    datatype: 'json', mtype: 'GET',
                    cmTemplate: { title: false },
                    loadonce:true,
                    altRows: true,
                    jsonReader: { root: "rows", page: "page", total: "total", records: "records", repeatitems: false, userdata: "userdata", id: "Code" },
                    editurl: 'clientArray',
                    onSelectRow: function (id) {
                        if (id && id !== lastsel) {
                            jQuery(grid_selector).jqGrid('restoreRow', lastsel);
                            //jQuery(grid_selector).jqGrid('saveRow', lastsel);
                            jQuery(grid_selector).jqGrid('editRow', id, true);
                            lastsel = id;
                        }
                    },

                }).navGrid(pager_selector, { view: false, del: false, add: false, edit: false, search: false, refresh: true }
                 ).jqGrid('filterToolbar', { stringResult: true, searchOnEnter: false, defaultSearch: 'cn' });
            });


  $(".submit").click(function () {
                var localGridData = $("#AcOpenDataGrid").jqGrid('getGridParam', 'data');
                //To Do : Post Ajax here. 
         });