- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我的 search:suggest
调用中,我在元素上指定了 word 前缀约束。由于某种原因,我没有收到有关前缀约束搜索的建议:
这段代码说明了我的问题:
let $doc :=
<doc>
<title>Show me some suggestions!</title>
</doc>
return xdmp:document-insert('so.xml', $doc);
import module namespace search = "http://marklogic.com/appservices/search"
at "/MarkLogic/appservices/search/search.xqy";
search:suggest('title:',
<options xmlns="http://marklogic.com/appservices/search">
<constraint name="title">
<word collation="http://marklogic.com/collation/en">
<element name="title" />
</word>
</constraint>
<default-suggestion-source>
<word-lexicon collation="http://marklogic.com/collation/en"/>
</default-suggestion-source>
</options>
)
这不会产生任何建议。仅在添加以下 suggestions-source
后,我才得到预期的建议:
<suggestion-source ref="title">
<word collation="http://marklogic.com/collation/en">
<element name="title"/>
</word>
</suggestion-source>
这似乎与range
或collection
约束不同,建议开箱即用,无需suggestion-source
.
对于单词
约束不显示建议是否有原因,例如表现?此行为是否记录在某处?
使用 MarkLogic 9.0-8。
最佳答案
如果您为特定 JSON 属性或元素创建了单词词典,则选项应该能够以这种方式引用约束:
<default-suggestion-source ref="title"/>
或者以这种方式识别内联单词词典:
<default-suggestion-source>
<word collation="http://marklogic.com/collation/en">
<element name="title" />
</word>
</default-suggestion-source>
单词词典查询选项指定数据库范围的单词词典。如果已为数据库启用了数据库范围的单词词典,则 word-lexicon 元素应该可以工作——尽管不建议这样做(除非数据库非常小)。
有关详细信息,请参阅:
http://docs.marklogic.com/guide/search-dev/search-api#id_89118
http://docs.marklogic.com/guide/search-dev/appendixa#id_35361
希望有帮助,
关于marklogic - 没有字数限制的建议,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54200837/
今天我从 MarkLogic 查询控制台得到一个奇怪的输出。当我尝试获取 MarkLogic 数据库中已存在的文档的文档属性时,ML 查询控制台返回一个空的查询序列。 这返回了一个文档: fn:do
根据文档: 如果内容定期更新,理想情况下,每个林每个林应该有两个 CPU(或内核)。 例如,双处理器/双核机器应该能够托管两个 256GB 的林,而四处理器/双核系统应该能够托管四个 256GB 的林
在使用 ml-gradle 进行部署期间,我必须使用 marklogic API 在集群中创建多个引导主机。 我知道我可以通过管理控制台(8001 端口)配置它,但我不知道如何使用 MarkLogic
是否有任何参数可以控制森林的最大尺寸?或任何最佳实践,运行中的脚本? 最佳答案 森林大小没有硬性限制,但有一些一般准则。文档的大小和类型、索引、硬件规范和使用模式等因素都会影响性能。 来自 MarkL
将队列大小从默认的 100000 增加到 500000 会产生什么影响? 是否有经验法则来计算合理的最大数量使用可用资源(如 RAM、CPU 核心和其他需要考虑的资源)的队列大小。 如有任何建议,我们
我正在使用 获取给定搜索字符串的方面 search:search($q, $options) 其中$q是搜索文本和 $options 是 frequency-order
什么是 MarkLogic 中的注册查询,用例是什么? http://docs.marklogic.com/cts:registered-query 最佳答案 MarkLogic 在 Search D
CAP 定理对我来说似乎合乎逻辑。我的理解是: 如果我在分布式系统上有一致性,我必须等待所有交易。 ACID 的成本是复制所有数据的时间网络。 但 Marklogic 怎么能两者兼得呢。 ACID和分
如何在 MarkLogic 中找到文档的创建日期? 我希望找到类似 xdmp:document-creation-date() 的东西。 谢谢。 最佳答案 MarkLogic 将 maintain a
ML 8是否已支持按路径索引进行排序?我想要实现类似于以下内容: attritbutes//name 如果没有,有没有办法做到这一点?我有几个名称相同的元素,它们来自不同的父节
我有一个多 TB 的生产数据库(MarkLogic 9.0-8,RedHat),我需要向其添加 2 个新的元素范围索引。在我可以执行更改之前,我需要估计将受重新索引影响的文档数量,以确保我的维护窗口足
我在 Marklogic 数据库中有大约 20 个 lacs 文档。我希望我的搜索应用程序中的文档总数用于分页。为了获得我正在使用的总数 xdmp:estimate(cts:search(doc(),
var marklogic=require('marklogic'); var ins=marklogic.createDatabaseClient({'host':'localhost','port
我在 MarkLogic 7 中有一个 3 节点集群。我创建了一个数据库“sample-db”,其中包含以下林: sample-db-01 托管在 node-1 上 sample-db-02 托管在
您能否提供启用集合词典的查询。 我已经使用了这个编码,但我遇到了同样的问题。 xquery 版本“1.0-ml”; import module namespace admin = "http://
我有一个主集群和一个外部集群耦合在一起。此外,我还为几个数据库启用了数据库复制,并将按名称设置为 false 的林连接。我想将这两个集群分离,并在几天后以最少的停机时间重新耦合它们。我们的主要事件是从
有没有办法使用关系运算符来使用 MarkLogic 自定义约束进行搜索? 对于正常范围查询,我可以搜索完全匹配(“thing:123”)或使用关系运算符(“thing LT 123”)。但是,当我编写
我尝试了以下 xquery 示例,但它似乎只返回一个配置脚本,而不是在服务器上实际创建 NewDB。实际创建数据库和林的步骤是什么? xquery version "1.0-ml"; import
在将文件存储库加载到 MarkLogic 中时,我意识到它包含大量重复文档。例如,相同产品目录文档(“catalog.pdf”)的多个副本可能存在于几个不同的目录中,例如:/products/publ
除了之外,还有什么方法可以搜索PPT、PDF等二进制文件的内容吗? 使用 xdmp:document-filter() 函数将其转换为 X HTML 格式并在其上搜索? 最佳答案 基本上没有。您必须从
我是一名优秀的程序员,十分优秀!