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 possible.

As I said, I need something like this (pseudo code):

cts:element-value-match(xs:QName("element"), "200*")

except that I don't have a string range index on that field, but I do have an 
int range index instead.

Best,
Oleksii.

-----Original Message-----
From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Shan Jiang
Sent: Monday, June 19, 2017 2:06 PM
To: MarkLogic Developer Discussion <general@developer.marklogic.com>
Subject: Re: [MarkLogic Dev General] cts:element-value-match for integers

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
www.marklogic.com <http://www.marklogic.com/>






On 6/19/17, 12:59 PM, "general-boun...@developer.marklogic.com on behalf
of Oleksii Segeda" <general-boun...@developer.marklogic.com on behalf of
oseg...@worldbankgroup.org> wrote:

>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 integer
>indexes? I cannot pass a string as a second argument, so it's unclear how
>to do a wildcarded search.
>Ultimate goal is to find 2000 and 200, if user typed 200. I understand
>that I can create an additional string index, but I want to know if a
>better solution exists.
>
>Thanks.
>
>Oleksii Segeda
>IT Analyst
>Information and Technology Solutions
>www.worldbank.org
>
>
>
>
>_______________________________________________
>General mailing list
>General@developer.marklogic.com
>Manage your subscription at:
>http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to