Hi Erik, Thanks for your response.
Performance should not be an issue because we are using trailing wildcards. So all index matches are consecutive. Regards, Andreas 2017-04-03 20:58 GMT+02:00 Erik Hennum <[email protected]>: > Hi, Andreas: > > The REST API doesn't support the cts:*-match() functions out of the box. > > If you really need to match values in a range index, you can implement a > resource service extension that takes the appropriate parameters and makes > the call. > > To perform well at scale for a range index with many values (such as the > uri lexicon), you might think about passing in or constructing a > constraining query so the comparison is only on some values instead of all > values in the range index. > > > Erik Hennum > > > ------------------------------ > *From:* [email protected] [ > [email protected]] on behalf of Andreas Hubmer [ > [email protected]] > *Sent:* Monday, April 03, 2017 1:09 AM > *To:* MarkLogic Developer Discussion > *Subject:* Re: [MarkLogic Dev General] How to use uri-match in the java > api? > > Hi, > > Using queryManager.values I can invoke cts:uris, but how could I invoke > cts:uri-match with a wildcarded uri through the Java API? > > Thanks, > Andreas > > > > 2017-03-31 17:22 GMT+02:00 Justin Makeig <[email protected]>: > >> Apologies, I read too fast. You were asking about "Java", not >> "JavaScript". (Car is to carpet as Java is to JavaScript.) >> >> You'll need to specify a URI values constraint. >> >> <options xmlns="http://marklogic.com/appservices/search"> >> <values name="uris"> >> <uri/> >> </values> >> … >> </options> >> >> And then queryManager.values("uris", new JacksonHandle()) to use it. (Hat >> tip: Sam Mefford.) >> >> Take a look at <http://docs.marklogic.com/guide/java/searches#id_76144> >> and <http://docs.marklogic.com/guide/search-dev/appendixa#id_46397>. >> >> Justin >> >> > On Mar 31, 2017, at 8:08 AM, Justin Makeig <[email protected]> >> wrote: >> > >> > <https://docs.marklogic.com/cts.uriMatch> >> > >> > In general, the built-in functions map one-to-one between JavaScript >> and XQuery. (There are exceptions.) Because hyphens aren't friendly in >> JavaScript property names, we do a kabab-case to camel-case translation for >> all of the names in JavaScript, i.e. cts:uri-match() in XQuery is >> cts.uriMatch() in JavaScript. >> > >> > Justin >> > >> >> On Mar 31, 2017, at 3:31 AM, Andreas Felix <[email protected]> >> wrote: >> >> >> >> Hi, >> >> i need to fetch uris by wildcard, eg. foo* >> >> In xquery i use the cts:uri-match function for this. >> >> Does anybody know how so solve this with the Java-API? >> >> >> >> Regards >> >> Andreas >> >> _______________________________________________ >> >
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
