简体   繁体   English

MarkLogic 8 - XQuery - 如何做 cts:element-value-query 部分匹配

[英]MarkLogic 8 - XQuery - How to do cts:element-value-query partial match

Say I have:说我有:

<location>Houston, TX</location>

I can easily do:我可以轻松做到:

cts:element-value-query(xs:QName("location"), "Houston, TX")

But how can I easily do: cts:element-value-query(xs:QName("location"), "*TX*")但是我怎样才能轻松做到: cts:element-value-query(xs:QName("location"), "*TX*")

What you really want is cts:element-word-query(xs:QName("location"), "TX") to match on the word rather than a wildcard.您真正想要的是cts:element-word-query(xs:QName("location"), "TX")匹配单词而不是通配符。 There's ways to do wildcards, but that's not needed here.有多种方法可以使用通配符,但这里不需要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM