MarkLogic的Node.js API是否支持配置的搜索选项? [英] Does MarkLogic's Node.js API support configured search options?

查看:39
本文介绍了MarkLogic的Node.js API是否支持配置的搜索选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在REST API中,我可以存储配置的搜索选项,然后通过点击 GET http://server:port/v1/search?options = foo 来使用它们.在Node.js API文档中查找,我看不到任何有关使用类似配置的搜索选项的引用.Node Client API是否支持使用配置的选项?

In the REST API, I can store configured search options and then use them by hitting GET http://server:port/v1/search?options=foo. Looking in the Node.js API documentation, I don't see any reference to using configured search options like that. Does the Node Client API support the use of configured options?

推荐答案

是的,这是故意的.

Node.js API在客户端上指定查询,而不是在客户端和服务器上保留部分查询定义.

The Node.js API specifies the query on the client instead of maintaining part of the query definition on the client and part on the server.

对于将查询定义与查询条件分开是有利的情况,一种可能的方法是创建一个具有查询条件并返回查询的函数的小型库.

For cases where it is beneficial to separate query definition from query criteria, one possible approach is to create a small library with functions that takes query criteria and returns queries.

希望有用

这篇关于MarkLogic的Node.js API是否支持配置的搜索选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆