Hi Team,

I am working on wildcard searches with multilingual data. I have enabled 
3-character searches,  3 character word-positions, 2-character searches, 
trailing wildcard searches on database.

I have the following document:

<doc>
       <test xml:lang="zh">烧碱</test>
       <test xml:lang="en">Caustic Soda</test>
</doc>

Problem is that I want to get this document only if I search for “*Caus*” in 
“en” and not in “zh”.  ML is returning me the document even if I perform the 
following queries where “lang=zh” has been used. Also need to understand what 
this “lang” option actually does? Or is it a bug in MarkLogic?

cts:search(
fn:doc(),
  cts:element-value-query(xs:QName("test"), "Caus*", ("wildcarded","lang=zh")),
  "unfiltered")

cts:search(
  fn:doc(),
  cts:element-query(xs:QName("test"),
  cts:word-query("Caus* *", ("wildcarded","lang=zh"))),
  "unfiltered")

Can’t use path range queries since it doesn’t support wildcards. Any help would 
be much appreciated. Thanks in advance.

Thanks,
Rahul
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to