Comunica 查询来源 确定优化查询操作
一个 优化查询操作 演员
在上下文中识别所有查询源
页:1 查询源识别总线。 。 。 .
它将使用 KeysQueryOperation.querySources, (中文(简体) ),
和查询中与SERVICE条款对应的源将存储
使用 KeysQueryOperation.serviceSources。 。 。 .
不得从当地档案系统中调阅SERVICE条款的来源,
除非 serviceAllowFileTargets 上下文条目已启用.
这个角色还包含一个缓存,这样在多个查询执行中会重复使用相同的来源.
此缓存可以通过 engine.invalidateHttpCache()。 。 。 .
这个模块是 通信框架, (中文(简体) ), 并且只能用于 想要建立自己的查询引擎的开发者。 。 。 .
如果您想要询问Comunica, 请点击这里。 。 。 .
安装
$ yarn add @comunica/actor-optimize-query-operation-query-source-identify
配置
安装后,此软件包可以添加到您的引擎配置中如下:
{
"@context": [
...
"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-optimize-query-operation-query-source-identify/^1.0.0/components/context.jsonld"
],
"actors": [
...
{
"@id": "urn:comunica:default:optimize-query-operation/actors#query-source-identify",
"@type": "ActorOptimizeQueryOperationQuerySourceIdentify",
"mediatorQuerySourceIdentify": { "@id": "urn:comunica:default:query-source-identify/mediators#main" },
"mediatorContextPreprocess": { "@id": "urn:comunica:default:context-preprocess/mediators#main" }
}
]
}
背景参数
serviceAllowFileTargets: 可选旗帜, 表示 SERVICE 条款是否针对本地文件, 默认为false。 。 。 . 启用此功能可以让查询读取任意的本地文件, 只有在所有查询都来自信任的当事方时才应进行.