The only workaround using the int index that I could think of would be to use
ranges with range-queries. Something like:
let $pattern := 200
return cts:or-query((
for $i in 0 to 10
let $power := xs:int(math:pow(10, $i))
let $start := $pattern * $power
let $end := ($pattern + 1) * $power
Hi Oleksii,
You'll have to create a string range index too. I've never used
cts:element-value-match() with anything but a string index, but it looks
like it's possible: you just get back the value you asked for, if it
exists. And now that I think about it, that can be rather useful! So thanks
for
Christopher,
It gives false positives if I use it with cts:element-values.
Shan,
The rule is to find all values which start with given value. For example, 200
should match 200, 2001, 2002, ... 20010, 20020, 2002123, etc..
Are you suggesting to guess all possible combinations? If so, it's not p
What is your exact search rule? From your example, looks like you try to
look for another number by adding a ³0². If that is the case, can you run
a cts:or-query, one for 200, and one for 2000?
Shan Jiang
Principal Consultant
MarkLogic Corporation
shan.ji...@marklogic.com
Phone: +1 703 869 4672
ww
Does element-value-query work for you? You might need wildcard indexes,
but perhaps you have them on.
On Fri, Jun 16, 2017 at 6:16 PM, Oleksii Segeda
wrote:
> Hi everyone,
>
> Can someone explain how does cts:element-value-match work with integer
> indexes? I cannot pass a string as a second ar
I'm willing to be corrected by a MarkLogic guru, but my understanding is that
wildcard searches are applicable only to string data types. So if you want to
enable a "wildcard match" on a numeric index, you would in fact have to create
a
second index on your element with type xs:string and evalu
Hi everyone,
Any thoughts on this?
Oleksii.
-Original Message-
From: Oleksii Segeda
Sent: Friday, June 16, 2017 6:16 PM
To: general@developer.marklogic.com
Subject: cts:element-value-match for integers
Hi everyone,
Can someone explain how does cts:element-value-match work with intege