共起を使用して値を返すために、単語クエリに対して XQuery 検索を実行しています。しかし問題は、ワイルド カード検索の実行中に、一致するドキュメントの一部として特定の誤検出が返されることです。実行される要素語クエリは
cts:element-word-query(fn:QName("", "contents"), "project monitor*",
("case-insensitive","punctuation-insensitive","stemmed","lang=en"), 1)
実行されるクエリは
cts:element-value-co-occurrences(xs:QName("node1"), xs:QName("node2"),
("collation=http://marklogic.com/collation/"),
cts:and-query((
cts:element-word-query(fn:QName("", "node3"), "project monitor*", ("case-insensitive","punctuation-insensitive","stemmed","lang=en"), 1),
cts:element-range-query(
xs:QName("node4"),
"=",
xs:long('1234567891011')
),
cts:element-attribute-range-query(
xs:QName("node5"),
xs:QName("attribute1"),
"=",
""
),
cts:collection-query('collection1'),
()
))
)
2 つの一致する結果が返されます。1 つは陽性で、もう 1 つは偽陽性の項目です。
<cts:co-occurrence>
<cts:value xsi:type="xs:string">General</cts:value>
<cts:value xsi:type="xs:string">/pdf/text-document/12345_0_1234.xml</cts:value>
</cts:co-occurrence>
<cts:co-occurrence>
<cts:value xsi:type="xs:string">Other</cts:value>
<cts:value xsi:type="xs:string">/pdf/text-doc/1234_1_0000.xml</cts:value>
</cts:co-occurrence>