- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个奇怪的问题,我正在做 cts:uri 和 cts:search.. 而我的 cts:uris 给了我 7 个结果,而 cts:search 只给了 3 个结果..
不知道我做错了什么,希望有人能指出我做错了什么。我尝试了所有我知道的可能性:).. 遵循我正在运行的代码
xquery version "1.0-ml";
declare namespace html = "http://www.w3.org/1999/xhtml";
import module namespace search = "http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy";
let $q := '(Dermatolog*) AND ((context:KN)) AND ((gene:"STAT3") AND (indication:"Carcinoma")) AND ((uploadDate:"today")) AND (sort:date_desc)'
let $options :=
<options xmlns="http://marklogic.com/appservices/search">
<additional-query>
<cts:collection-query xmlns:cts="http://marklogic.com/cts">
<cts:uri>http://abc/xyz/type/envelope</cts:uri>
</cts:collection-query>
</additional-query>
<operator name="sort">
<state name="date_desc">
<sort-order type="xs:dateTime" direction="descending">
<field name="upload_date"/>
</sort-order>
</state>
<state name="date_asc">
<sort-order type="xs:dateTime" direction="ascending">
<field name="upload_date"/>
</sort-order>
</state>
</operator>
<constraint name="context">
<range type="xs:string" facet="true">
<element name="context" ns="http://abc/xyz/metadata"/>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
</range>
</constraint>
<constraint name="type">
<range type="xs:string" facet="true">
<element name="type" ns="http://abc/xyz/metadata"/>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
</range>
</constraint>
<constraint name="file-type">
<range type="xs:string" facet="true">
<element name="file-type" ns="http://abc/xyz/metadata"/>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
</range>
</constraint>
<constraint name="drug">
<range type="xs:string" facet="true">
<path-index>//Hit[@type='DRUG']/Name</path-index>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
<facet-option>limit=10</facet-option>
</range>
</constraint>
<constraint name="compound">
<range type="xs:string" facet="true">
<path-index>//Hit[@type='COMPOUNDS']/Name</path-index>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
<facet-option>limit=10</facet-option>
</range>
</constraint>
<constraint name="species">
<range type="xs:string" facet="true">
<path-index>//Hit[@type='SPECIES']/Name</path-index>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
<facet-option>limit=10</facet-option>
</range>
</constraint>
<constraint name="company">
<range type="xs:string" facet="true">
<path-index>//Hit[@type='COMPANY']/Name</path-index>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
<facet-option>limit=10</facet-option>
</range>
</constraint>
<constraint name="indication">
<range type="xs:string" facet="true">
<path-index>//Hit[@type='INDICATION']/Name</path-index>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
<facet-option>limit=10</facet-option>
</range>
</constraint>
<constraint name="gene">
<range type="xs:string" facet="true">
<path-index>//Hit[@type='GENE']/@id</path-index>
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
<facet-option>limit=10</facet-option>
</range>
</constraint>
<constraint name="uploadDate">
<range type="xs:dateTime" facet="true">
<computed-bucket lt="P1D" ge="P0D" anchor="start-of-day" name="today">Today</computed-bucket>
<computed-bucket lt="P0D" ge="-P1D" anchor="start-of-day" name="yesterday">Yesterday</computed-bucket>
<computed-bucket lt="-P1D" ge="-P15D" anchor="start-of-day" name="2-weeks">Last 2 Weeks</computed-bucket>
<computed-bucket lt="-P15D" ge="-P30D" anchor="start-of-day" name="month">A Month ago</computed-bucket>
<computed-bucket lt="-P30D" ge="-P365D" anchor="start-of-day" name="year">A Year ago</computed-bucket>
<computed-bucket name="older" lt="-P365D" anchor="start-of-day">Older</computed-bucket>
<facet-option>descending</facet-option>
<field name="upload_date"/>
</range>
</constraint>
<constraint name="author">
<range type="xs:string" facet="true">
<facet-option>frequency-order</facet-option>
<facet-option>descending</facet-option>
<facet-option>limit=10</facet-option>
<field name="author"/>
</range>
</constraint>
<term>
<term-option>case-insensitive</term-option>
<term-option>punctuation-insensitive</term-option>
<term-option>whitespace-insensitive</term-option>
<term-option>wildcarded</term-option>
</term>
<return-facets>true</return-facets>
<return-results>true</return-results>
<transform-results apply="empty-snippet"/>
</options>
return
(
cts:uris("", ('document'), cts:query(search:parse($q, $options))),
cts:search(fn:doc(), cts:query(search:parse($q, $options)))
)
最佳答案
这是过滤查询与未过滤查询的效果。 cts:uris
只能在未过滤的情况下运行,这意味着它仅使用索引并且可能返回误报,具体取决于您的索引设置。 cts:search
默认过滤查询,您必须指定 unfiltered
在选项参数中。
还要注意您的 <search:options>
中指定的大多数选项当您使用 cts:search
时,元素不会自动应用而不是 search:resolve
,包括 <additional-query>
.
关于marklogic - cts :uris and cts:search returning different results,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39155166/
如果您了解 Android 兼容性测试套件。请将CTS源码下载、环境搭建、搭建和执行等信息发给我们。 最佳答案 您可以找到关于 setting up and running CTS 的所有信息在这里。
我有一个奇怪的问题,我正在做 cts:uri 和 cts:search.. 而我的 cts:uris 给了我 7 个结果,而 cts:search 只给了 3 个结果.. 不知道我做错了什么,希望有人
cts:count有什么区别, cts:frequency , fn:count在 MarkLogic 中? 你能用例子支持我吗? 最佳答案 cts:count 已弃用,它被设计为采用词典函数返回的一
我使用下面提到的命令为 64 位目标运行相机 Android 7 CTS,但所有 CTS 首先为 64 位目标运行两次,然后为 32 位目标运行两次。 run cts-camera --skip-pr
我们正在开发一个存储大量数据的企业应用程序。在我们的应用程序中,我们强制用户创建多个路径范围索引以加快搜索速度。 早些时候,我们利用路径范围索引来加快搜索速度,使用 cts:路径范围查询()但现在我发
我正在尝试运行 android CTS 测试。 这是我运行时出现的错误: E/TestInvocation: Unexpected contents in directory /tmp/android
我一直试图在PHP中为CBC实现Ciphertext Stealing(CTS)。 在下面引用两个链接 How can I encrypt/decrypt data using AES CBC+CTS
我一直在尝试在从源代码构建的 Android 副本上使用 Android CTS 包,但我遇到了很多测试超时然后失败的问题。 我是从标签 android-cts-verifier-4.0.3_r1 构
Android CTS 文档如下所述。 “要对在多个设备上运行的计划测试进行 fragment :- run cts -plan CTS --shards 那我就这么干。但我做不到。PC肯定能识别多
由于英语不是我的母语,我想知道单词 Common Type System (CTS) 的确切语义。它们是否可以解释为通用类型系统或 .NET Framework 通用的类型系统?也就是系统通用还是类型
我的要求是获取数据库中可用文档的总数。 cts.estimate( cts.trueQuery() ) 当我执行上述查询时,它返回 1283265文档计数但是当我从 qconsole 浏览数据库时
鉴于此查询: for $d in cts:search( fn:doc(), cts:and-query( ( cts:c
在marklogic中,三元组可以嵌入到现有文档中。我如何使用 cts 搜索查询返回文档。文档的示例可以是 Testing Approved http://myco
如何终止正在运行的 CTS 实例。假设一个 CTS 实例正在运行在一个终端上,如果我们突然关闭那个终端,那个 CTS实例不会关闭,当我们尝试再次启动 CTS 时新终端,我们收到此错误 [CTS_ERR
我已经学会了如何构建 CTS 并执行它。 现在,我想知道CTS工作流程的过程。任何人都可以解释一下或分享您如何在 CTS 中添加测试包然后构建新的 CTS 来测试您的应用程序的经验吗? 我尝试在谷歌中
我正在尝试找到一种方法,让 cts-tradefed 在出现故障时抓取 logcat 文件,并且可能还会获取错误报告。主要是因为当我运行完整的 CTS 计划时,最后需要很长的日志是没有用的 最佳答案
我发现了一些 CTS 错误,如下所示: 兼容性测试用例:CtsAppTestCases 包名称:android.app.cts.DialogTest 错误: -- testContextMenu
我在我的机器上连接了 2 个设备,我想在这两个设备上运行 Google CTS。但这里的问题是,每当我运行 ./startcts 命令时,两个设备都会连接到 session 。 我的要求: 我想在两台
我正在运行 Android 2.2 的模拟器上运行 Android CTS Android 测试计划。 但是大部分测试用例都显示超时,错误显示com.android.ddmlib.ShellComma
我们如何完成以下任务: 在运行时我们可以跳过任何包或案例...? 最佳答案 您不能直接在 CTS 中跳过特定的测试用例。为此,您必须手动执行要执行的测试用例。由于有成千上万的测试用例,因此执行测试用例
我是一名优秀的程序员,十分优秀!