Re: [MarkLogic Dev General] Search API total not equal to number of search results

2015-01-05 Thread Erik Hennum
Hi, Danny: Can you share your query and options? Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Danny Sinang [d.sin...@gmail.com] Sent: Monday, January 05, 2015 1:44 PM To: general Subject

Re: [MarkLogic Dev General] Search API total not equal to number of search results

2015-01-06 Thread Erik Hennum
; let $search := '(qAuthoringState:"Approved" OR qAuthoringState:"Warning") AND (qAudiencePoolGroup:(qApName:"Internal Medicine Audience Pool" AND qApRelevance GE "1" AND qApRelevance LE "1")) AND (entry:(k

Re: [MarkLogic Dev General] XQuery results through REST

2015-01-08 Thread Erik Hennum
t-dev/extensions http://docs.marklogic.com/guide/rest-dev/extensions#id_55309 In MarkLogic 8, by the way, the REST API will support eval directly. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general

Re: [MarkLogic Dev General] How to get all result in single hit through REST API

2015-01-09 Thread Erik Hennum
n practice, that will fail for any significant result set. Geert's recommendation will scale and perform much better. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Geert Josten [geert.jos..

Re: [MarkLogic Dev General] Trouble using two separate REST instances on one machine

2015-01-12 Thread Erik Hennum
. But you shouldn't have to do so. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Kampf, Arne [arne.ka...@ciber.com] Sent: Monday, January 12, 2015 7:02

Re: [MarkLogic Dev General] Exact match in search:search implementation

2015-01-13 Thread Erik Hennum
would not scale. Can you expand on how you're using the total? You may be able to solve the problem in other ways. For instance, you can terminate paging on the first page with fewer than page-length results. Erik Hennum [1] The exception is that, starting in 8.0, the Search API calcu

Re: [MarkLogic Dev General] Exact match in search:search implementation

2015-01-14 Thread Erik Hennum
large for that to be a possibility. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of shruti kapoor [shrutikapoor@gmail.com] Sent: Tuesday, January 13, 2015 10:04 PM To: MarkLogic Developer

Re: [MarkLogic Dev General] Stuck creating a new XQuery resource service extension (ML7)

2015-01-16 Thread Erik Hennum
words, the approach prefers convention over configuration.) Here is an example that shows the XQuery function signatures: http://docs.marklogic.com/guide/rest-dev/extensions#id_20771 Hoping that helps, Erik Hennum From: general-boun...@developer.mar

Re: [MarkLogic Dev General] unable to change uri and output-types in marklogic7 using transformation rest api

2015-02-03 Thread Erik Hennum
ce service extension instead of a transform. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of vikas.sin...@cognizant.com [vikas.sin...@cognizant.com] Sent: Tuesday, February 03, 20

Re: [MarkLogic Dev General] document rest api with json transformation

2015-02-03 Thread Erik Hennum
need for the built-in transform. By assigning the .json extension now, you will be able to preserve stable document identity when upgrading to MarkLogic 8. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun

Re: [MarkLogic Dev General] document rest api with json transformation

2015-02-03 Thread Erik Hennum
mapping table, but that would just be a short term solution. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of gnanaprakash.bodire...@cognizant.com [gnanaprakash.bodire...@cognizant.com

Re: [MarkLogic Dev General] document rest api with json transformation

2015-02-04 Thread Erik Hennum
e the .xml extension, not the mime types themselves. I should have added that you would always have to specify the Content-Type with the PUT because it could no longer be determined from the extension. Erik Hennum From: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] Response code issue in marklogic6

2015-02-18 Thread Erik Hennum
reason you can't upgrade to 7, a resource service extension could probably eval into a separate transaction to perform the real work of the resource service extension and then, after the eval finishes, throw a RESTAPI-EXTNERR error to set the status code. Hoping that helps, Erik H

Re: [MarkLogic Dev General] Preserving the HTML5 doctype

2015-02-19 Thread Erik Hennum
i=/path/to/the/doc.xhtml&transform=html5ifier You might find that you need to make additional changes to the XHTML document within the transform (either on the XML before quoting or on the string after quoting), but that should get you closer. Hoping that helps, Erik Hennum

Re: [MarkLogic Dev General] JAVA API Query formation

2015-02-20 Thread Erik Hennum
that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Maisnam Ns [maisnam...@gmail.com] Sent: Friday, February 20, 2015 2:40 AM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General

Re: [MarkLogic Dev General] JAVA API Query formation

2015-02-21 Thread Erik Hennum
logic/client/query/QueryManager.html#tuples(com.marklogic.client.query.ValuesDefinition,%20T) http://docs.marklogic.com/javadoc/client/com/marklogic/client/query/Tuple.html#getCount() Hoping that helps, Erik Hennum From: general-boun...@de

Re: [MarkLogic Dev General] JAVA API Query formation

2015-02-21 Thread Erik Hennum
#id_95439 The Java API provides an interface for installing and executing server-side XQuery or JavaScript: http://docs.marklogic.com/guide/java/resourceservices#id_27702 Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general

Re: [MarkLogic Dev General] Issue with Registering Resoruce extenion in cluster

2015-03-11 Thread Erik Hennum
share the same modules database. You should only have to install the resource service extension once. Can you expand on how the extension was not working as expected before you installed on the other nodes? Erik Hennum From: general-boun

Re: [MarkLogic Dev General] Constructing JSON objects

2015-03-11 Thread Erik Hennum
Hi, Will: You can use json:object() instead of map:map() for a mutable object where order is important. I think the API is the same as that of map:map otherwise. JSON nodes, like XML nodes, are immutable. Erik Hennum From: general-boun

Re: [MarkLogic Dev General] Issue with Registering Resoruce extenion in cluster

2015-03-12 Thread Erik Hennum
u're using so Support can create a bug? Thanks, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of gnanaprakash.bodire...@cognizant.com [gnanaprakash.bodire...@cognizant.com] Sent: Th

Re: [MarkLogic Dev General] ML8 404 Error

2015-03-20 Thread Erik Hennum
he Admin Ui and check the url rewriter field to make sure that upgrade has set the field to /MarkLogic/rest-api/rewriter.xml instead of /MarkLogic/rest-api/rewriter.xqy Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] REST API allows for downloading of code

2015-03-28 Thread Erik Hennum
know that users with such roles can execute extensions and read and write documents. I suspect (but haven't confirmed) that such users can't read extensions. Hoping that's useful, Erik Hennum From: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] REST API allows for downloading of code

2015-03-29 Thread Erik Hennum
would be to install a main module with any permissions you choose and invoke the main module. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Danny Sinang [d.sin...@gmail.com] Sent: Saturday, Mar

Re: [MarkLogic Dev General] fn:error

2015-03-30 Thread Erik Hennum
Hi, Pragya: One footnote to Asit's guidance -- if you're extending the REST API, you can throw the RESTAPI-SRVEXERR error to set the HTTP response. For more, see: http://docs.marklogic.com/guide/rest-dev/extensions#id_33892 Erik Hennum From: ge

Re: [MarkLogic Dev General] rest search using range index

2015-03-30 Thread Erik Hennum
mp;value=Aluminum That said, the keyvalue endpoint is deprecated in favour of the qbe (Query by Example) or search endpoints, so you don't want to write any new code against that endpoint. Hoping that helps, Erik Hennum From: general-boun...@devel

Re: [MarkLogic Dev General] search:search constraint for document URI

2015-04-01 Thread Erik Hennum
rs to type document uris into a search box or an application to build facets over document URIs (which by definition have one fragment per URI). Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf

Re: [MarkLogic Dev General] search:search constraint for document URI

2015-04-01 Thread Erik Hennum
ng parsing. It's also easy to modify a structured query as needed on a different layer. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Danny Sinang [d.sin...@gmail.com] Sent: Wednesday, April 01,

Re: [MarkLogic Dev General] Inserting multiple documents into temporal question with system time - TEMPORAL-SYSTEM-MUSTGETAFTERSET error

2015-04-02 Thread Erik Hennum
Hi, Adrian: The root cause is a bug in the REST API. In 8.0-1, REST API clients (including both the Node.js API and Java API) cannot set the system time for more than one document in a bulk document request. It looks like the fix will be in 8.0-2 Thanks for reporting the issue, Erik Hennum

Re: [MarkLogic Dev General] Inserting multiple documents into temporal question with system time - TEMPORAL-SYSTEM-MUSTGETAFTERSET error

2015-04-08 Thread Erik Hennum
Hi, Julia: I don't think the bug list for 8.0-2 is published yet. The fix for this bug is included in 8.0-2 -- Bug 33016. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Julia Ego

Re: [MarkLogic Dev General] How to find particular element using path index

2015-04-12 Thread Erik Hennum
ot shown below). Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Shashidhar Rao [raoshashidhar...@gmail.com] Sent: Sunday, April 12, 2015 9:13 AM To: general@developer.marklo

Re: [MarkLogic Dev General] How to find particular element using path index

2015-04-12 Thread Erik Hennum
Hi, Shashidhar: Thanks for clarifying. Did you create a search:values element? http://docs.marklogic.com/search:values The values() request uses a search:values definition that contains the range index specification. Erik Hennum From: general-boun

Re: [MarkLogic Dev General] How to find particular element using path index

2015-04-12 Thread Erik Hennum
Hi, Shashidhar: Does the configuration of the path index in the Admin UI specify the same data type (string with the same collation)? If so, it might be time to add true to the options and get the response with a string handle so you can see what's being executed on the server. Erik H

Re: [MarkLogic Dev General] cannot fetch ordered documents from specified collection using nodeJS

2015-04-14 Thread Erik Hennum
to use the Query Builder with the collection instead of QBE. Thanks for identifying the issue, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Julia Egoshina [julia.egosh...@riskdata

Re: [MarkLogic Dev General] cannot fetch ordered documents from specified collection using nodeJS

2015-04-15 Thread Erik Hennum
Hi, Julia: Expect a fix to Bug 33139 in MarkLogic 8.0-3. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Julia Egoshina [julia.egosh...@riskdata.com] Sent: Tuesday, April 14, 2015 10:35

Re: [MarkLogic Dev General] rest-writer and URI privileges

2015-04-16 Thread Erik Hennum
Hi, Andreas and Geert: In 7.0-5 / 8.0-1, a bug fix (31026 / 31027) switched the REST writer from any-uri to unprotected-uri privilege. The REST admin continues to have any-uri privilege. Did that fix resolve the problem or are there additional issues? Erik Hennum

Re: [MarkLogic Dev General] Same contraints name with multiple element indexes

2015-04-21 Thread Erik Hennum
need facets) that returns an AND query over the two elements. http://docs.marklogic.com/guide/search-dev/search-api#id_49750 Hoping that's useful, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on

Re: [MarkLogic Dev General] snip:truncate-text() has been renamed to snip:truncate( ) in ML8

2015-04-22 Thread Erik Hennum
ementation function to see if the cases you need to support happen to be implemented consistently (not only for this upgrade but for future upgrades as well). Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on

Re: [MarkLogic Dev General] Additional Query in Rest

2015-04-23 Thread Erik Hennum
that's being executed. By the way, in MarkLogic 7, a structured query should be able to execute the same query in the search:* vocabulary. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogi

Re: [MarkLogic Dev General] Additional Query in Rest

2015-04-23 Thread Erik Hennum
query objects must already be serialized in the payload. Hoping that clarifies, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of gnanaprakash.bodire...@cognizant.com [gnanaprakash.bodire...@cognizan

Re: [MarkLogic Dev General] Moving REST API Instance module code to a directory in Modules database

2015-04-29 Thread Erik Hennum
re running into with that one-to-one approach? Thanks, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Danny Sinang [d.sin...@gmail.com] Sent: Wednesday, April 29, 2015 8:12 AM To: gener

Re: [MarkLogic Dev General] Moving REST API Instance module code to a directory in Modules database

2015-04-29 Thread Erik Hennum
Hi, Danny: Thanks for clarifying. Yes, that would be a sensible RFE. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Danny Sinang [d.sin...@gmail.com] Sent: Wednesday, April 29, 2015 10:07 AM

Re: [MarkLogic Dev General] custom search: Field contraint

2015-05-03 Thread Erik Hennum
tions You might also want to know that, in MarkLogic, the term "field" connotes an abstraction over JSON properties or XML elements: http://docs.marklogic.com/guide/admin/fields Hoping that helps, Erik Hennum From: general-boun...@developer.

Re: [MarkLogic Dev General] Analyze-data.xqy with JSON data

2015-05-03 Thread Erik Hennum
Hi, Puneet: Can you provide an example of the REST API call that you're making to analyze data? Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Yinyan guy [yinyan...@hotmail.com] Sent: Sat

Re: [MarkLogic Dev General] Moving REST API Instance module code to a directory in Modules database

2015-05-03 Thread Erik Hennum
work to put the same resources in $MARKLOGIC_INSTALL_DIR/Modules/v1/ext/YOUR_PATH/YOUR_MODULE.js, but that's a hack I've not tried. Even if that hack happens to work now, you wouldn't want to build up any infrastructure around it because it could stop working in the future.

Re: [MarkLogic Dev General] Analyze-data.xqy with JSON data

2015-05-03 Thread Erik Hennum
that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Yinyan guy [yinyan...@hotmail.com] Sent: Sunday, May 03, 2015 4:21 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev

Re: [MarkLogic Dev General] custom search: Field contraint

2015-05-04 Thread Erik Hennum
Hi, Puneet: To search with a single word instead of the full value, use a word constraint: http://docs.marklogic.com/guide/rest-dev/appendixa#id_72270 Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on

Re: [MarkLogic Dev General] json namespace changes in json:transform-from-json($input)

2015-05-04 Thread Erik Hennum
the database. The particular case looks like the input to a search request. Is there is a specific reason it must be encoded as XML? Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Indrajeet Verma

Re: [MarkLogic Dev General] custom search: Field contraint

2015-05-04 Thread Erik Hennum
cument. For more detail about metadata properties, see: http://docs.marklogic.com/guide/app-dev/properties#id_19516 Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Yinyan guy [yinyan...@

Re: [MarkLogic Dev General] updating a JSON document from AngularJS app

2015-05-08 Thread Erik Hennum
/master/examples/write-remove.js#L21 Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Yinyan guy [yinyan...@hotmail.com] Sent: Friday, May 08, 2015 6:39 AM To: general

Re: [MarkLogic Dev General] Search API : defining a new operator

2015-05-10 Thread Erik Hennum
), you might want to specify it directly in the options with the sort-order element: http://docs.marklogic.com/guide/rest-dev/appendixb#id_33716 Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun

Re: [MarkLogic Dev General] Search API : defining a new operator

2015-05-11 Thread Erik Hennum
guide/rest-dev/search#id_83871 If you POST query options, it would be better to specify the sort order in the options instead of parsing them from the string. You should consider whether you can run an unfiltered search (as with the default options). Hoping that helps, E

Re: [MarkLogic Dev General] Search API : defining a new operator

2015-05-12 Thread Erik Hennum
Hi, Puneet: How does the REST request identify the query options that define the list of sort keys? Whether it would be better for the client to specify the sort keys outside the query string is a separate question that doesn't affect the first question. Erik H

Re: [MarkLogic Dev General] Xquery to delete all null elements?

2015-05-12 Thread Erik Hennum
insignificant whitespace that doesn't count as a node, but I may be misremembering the rules for insignificant whitespace. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on beha

Re: [MarkLogic Dev General] Search API : defining a new operator

2015-05-13 Thread Erik Hennum
fy the sort operators in query options but don't associate your query options with the request, your query options would not apply to the request regardless of whether or not the query options are correct. Erik Hennum From: general-boun...@dev

Re: [MarkLogic Dev General] Custom query option problem

2015-05-13 Thread Erik Hennum
the header output tell you anything? Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Yeditha, Srinivas [s.yedi...@klopotek.com] Sent: Wednesday, May 13, 2015 3:23 PM To: general@developer.marklogic.c

Re: [MarkLogic Dev General] Custom query option problem

2015-05-14 Thread Erik Hennum
Hi, Srinivas: That is strange. You could try other endpoints and methods to see if the behaviour is consistent, but HTTP response headers suggest that the user or password is incorrect. Is the server configured to authenticate externally? Erik Hennum From

Re: [MarkLogic Dev General] Custom query option problem

2015-05-14 Thread Erik Hennum
into the same authorization problem for other common rest administrator requests. It would be better to solve the mystery. I think the next step would likely be contacting customer support. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun

Re: [MarkLogic Dev General] sort by relevance with querybuilder in node.js

2015-06-07 Thread Erik Hennum
tions clause, as in: .withOptions({categories:'none'}) The score() function should be passing the score method. As a workaround, you can set the score method using the search options key with the withOptions clause, as in: .withOptions({search:['score-random']})

Re: [MarkLogic Dev General] snippet do not work in querybuilder node.js

2015-06-07 Thread Erik Hennum
present.) It's easy to confuse the try/catch statement with the catch callback, but that's part of the Promises standard. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on b

Re: [MarkLogic Dev General] sort by relevance with querybuilder in node.js

2015-06-07 Thread Erik Hennum
Hi, Martin: This is probably the same issue from the "snippet do not work in querybuilder node.js" thread. The search resport is not a document descriptor, so the content.name path is invalid for the search report. Erik Hennum From: ge

Re: [MarkLogic Dev General] Field Search?

2015-06-08 Thread Erik Hennum
revious fragment: qb.where( qb.word('stateProperty', 'Washington') ) Hoping that clarifies, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Martin Vollmix [voll...@hot

Re: [MarkLogic Dev General] Confusion about REST API results

2015-06-23 Thread Erik Hennum
/qbe#id_26341 It is not possible to query both formats in either format. That's a good RFE. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Geert Josten [geert.jos...@marklogic.com]

Re: [MarkLogic Dev General] rang index for string element

2015-07-03 Thread Erik Hennum
requirements. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Chunyu Cong [congchu...@gmail.com] Sent: Friday, July 03, 2015 6:08 AM To: General@developer.marklogic.com Subject: [

Re: [MarkLogic Dev General] General Digest, Vol 133, Issue 16

2015-07-05 Thread Erik Hennum
create a path range index on /catalog/product@dept and execute a cts;path-range-query instead of the cts:element-query() above. For more information, see: http://docs.marklogic.com/guide/admin/range_index#id_40666 Hoping that helps, Erik Hennum From:

Re: [MarkLogic Dev General] Custom Error Handling for REST API call

2015-07-08 Thread Erik Hennum
00: RESTAPI-NODOCUMENT: (err:FOER) Resource or document does not exist: category: content message: /not/there.json Do you see the large output in the response or the log? If the latter, is it possible you have logging set to debug or more fine grained? Erik Hennum

Re: [MarkLogic Dev General] Custom Error Handling for REST API call

2015-07-08 Thread Erik Hennum
Hi, Danny: Thanks for clarifying. The case could be made that it is a bug for a 404 to generate a stack trace in the error log (even at debug level). Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on

Re: [MarkLogic Dev General] Can node libraries be installed server-side?

2015-07-12 Thread Erik Hennum
adata from spreadsheets without installing an external library: http://docs.marklogic.com/guide/search-dev/binary-document-metadata#id_74790 Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklog

Re: [MarkLogic Dev General] Can node libraries be installed server-side?

2015-07-14 Thread Erik Hennum
trary write could conflict with configuration managed by the REST API (such as transforms, resource extensions, and so on). Anyway, please keep the feedback coming. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogi

Re: [MarkLogic Dev General] search MarkLogic Database using Regular Expressions

2015-07-14 Thread Erik Hennum
on the list can recommend specific NLP tools for VIN recognition based on their experience. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Javier Lizarraga [jlizarr...@gennet.com

Re: [MarkLogic Dev General] Displaying document after an update

2015-07-17 Thread Erik Hennum
, xdmp:invoke-function() is especially convenient. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Danny Sinang [d.sin...@gmail.com] Sent: Friday, July 17, 2015 10:51 AM To: general

Re: [MarkLogic Dev General] Displaying document after an update

2015-07-17 Thread Erik Hennum
x27;replacement'}) }, update-auto-commit ), xdmp:invoke-function(function () { doc($uri) }) ) Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.mark

Re: [MarkLogic Dev General] False positives with element-query

2015-07-24 Thread Erik Hennum
will yield the rows you want. Did you try turning on range value positions for your range indexes? Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Basavaraj Kalloli [basavara

Re: [MarkLogic Dev General] False positives with element-query

2015-07-24 Thread Erik Hennum
swer, it sounds like you turned on element word positions, but >maybe I'm misreading. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Basavaraj Kalloli [basavarajkall...@gmail.com] Sent: Frida

Re: [MarkLogic Dev General] (no subject)

2015-07-25 Thread Erik Hennum
about extract, see: http://docs.marklogic.com/guide/node-dev/search#id_17648 Extract paths have the same limitations as paths for range indexes: http://docs.marklogic.com/guide/admin/range_index#id_40666 That said, modifying the model is usually the better approach in the long run. Ho

Re: [MarkLogic Dev General] (no subject)

2015-07-26 Thread Erik Hennum
't, however, use $value at the top level. To query on a datatyped value, create a range index on the JSON property and use $eq, $lt, or one of the other comparison operators. Hoping that helps, Erik Hennum From: general-boun...@dev

Re: [MarkLogic Dev General] (no subject)

2015-07-27 Thread Erik Hennum
7;)) .slice(5, 10) .calculate( qb.facet("department", qb.facetOptions('item-frequency','descending')) ) ) Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf o

Re: [MarkLogic Dev General] REST v1/documents/ DELETE Documentation issue (?)

2015-08-06 Thread Erik Hennum
Hi, Gilles: Support for multiple document delete first appeared in the 8.0-3 release. As usual, upgrading is recommended to take advantage of fixes like this one. Hoping that clarifies, Erik Hennum From: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] Multiple constraints

2015-08-06 Thread Erik Hennum
could experiment with the previous release (setting true in the options) to see which query was getting used. If the query for one of the constraints is never used, that would tell you which constraint to rename. Hoping that helps, Erik Hennum From: general

Re: [MarkLogic Dev General] Server Message: SVC-EXTIME: xdmp:lock-for-update("/docs/0f04c4fb-6058-4758-92eb-f9cfa2ea18bc") -- Time limit exceeded.

2015-08-18 Thread Erik Hennum
ctional without the explicit multi-statement transaction. If you're using MarkLogic 8, you might also consider writing documents in bulk (typically of around 100 for optimal sized documents) for better performance. Bulk writes are also transactional. Hoping that

Re: [MarkLogic Dev General] Issue with order of request parameters

2015-09-03 Thread Erik Hennum
Hi, Rahul: HTTP mandates that URI parameters are order-independent. I'm wondering if it's an issue with the client. What client are you using? If you try a different client (for instance, curl or wget or postman), does it make a difference? E

Re: [MarkLogic Dev General] .sjs vs .js

2015-09-17 Thread Erik Hennum
h the usual forward-looking caveats) support exactly that behavior by default. By contrast with library modules, *.js main modules will still default to treatment as resources for transfer to the client for execution in the browser (instead of server-side executables). Hoping that's usefu

Re: [MarkLogic Dev General] XDMP-RWINVAL

2015-11-11 Thread Erik Hennum
encapsulates such details for you. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Mahitha T U [mahita...@gmail.com] Sent: Wednesday, November 11, 2015 3:01 PM To: General Mark Logic Developer Discussion

Re: [MarkLogic Dev General] Search Constraints in XQuery

2016-01-21 Thread Erik Hennum
rch:parse() at first. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Ravindra B Mamidipaka [ravi_...@hotmail.com] Sent: Wednesday, January 20, 2016 5:55 AM To: MarkLogic Develope

Re: [MarkLogic Dev General] Search Constraints in XQuery

2016-01-22 Thread Erik Hennum
s easier to work with search:parse() at first. > > > Hoping that helps, > > > Erik Hennum > > > From: general-boun...@developer.marklogic.com > [general-boun...@developer.marklogic.com] on behalf of Ravindra B > Mamidipaka [ravi_...@

Re: [MarkLogic Dev General] If xml element exists

2016-01-27 Thread Erik Hennum
() matches against the indexes and thus (depending on the criteria) retrieves many fewer documents much more quickly. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Kapoor, Prag

Re: [MarkLogic Dev General] If xml element exists

2016-01-28 Thread Erik Hennum
note apply to inspecting the document with XPaths. Hoping that clarifies, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Kapoor, Pragya [pkapo...@innodata.com] Sent: Wednesday, January 27, 2016

Re: [MarkLogic Dev General] using node streams to write many documents into database

2016-02-08 Thread Erik Hennum
libraries available on npm and the Node.js client API certainly don't do all of that heavy lifting by themselves. Could mlcp be used for ingestion in your environment? Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.ma

Re: [MarkLogic Dev General] using node streams to write many documents into database

2016-02-09 Thread Erik Hennum
mal Node.js implementation with workers, batch assignment, and backpressure would be non-trivial, something simpler would still be useful. Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Jakob

Re: [MarkLogic Dev General] Issue with field range and field value indexes

2016-02-11 Thread Erik Hennum
f you create separate element value constraints for the title and genre, does that work? Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Jaydip Rananavare [jaydipra

Re: [MarkLogic Dev General] Return of xdmp.filesystemFile() not a proper string object?

2016-03-26 Thread Erik Hennum
which you can convert with valueOf(): Object.prototype.toString.call(xdmp.filesystemFile('/path/to/some.js').valueOf()); which yields: [object String] Hoping that helps, Erik Hennum From: general-boun...@developer.marklogi

Re: [MarkLogic Dev General] Need help in updating xml

2016-03-31 Thread Erik Hennum
hat's persisting the document and fix that code so the whole tree is persisted as XML. Then, xdmp:node-replace() will work without issue on the nested elements. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [ge

Re: [MarkLogic Dev General] Detecting a JSON document in XQuery

2016-04-03 Thread Erik Hennum
http://docs.marklogic.com/xdmp:node-kind http://docs.marklogic.com/xdmp:uri-format Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Florent Georges [li...@fgeorges.org] Se

Re: [MarkLogic Dev General] /node-client-api cannot get it working

2016-04-05 Thread Erik Hennum
helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Alex Muir [alex.g.m...@gmail.com] Sent: Tuesday, April 05, 2016 6:00 AM To: general@developer.marklogic.com Subject: [MarkLogic Dev General]

Re: [MarkLogic Dev General] Need help on document patch operation with replace-insert

2016-04-06 Thread Erik Hennum
http://docs.marklogic.com/guide/rest-dev/extensions#id_59188 Working with your support contact to create a bug would also be appropriate. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of

Re: [MarkLogic Dev General] /node-client-api cannot get it working

2016-04-06 Thread Erik Hennum
Hi, Alex: The sequence of operations that I suggested worked without hiccup for me. Especially given the 400 error, I'm wondering if the issue is on the MarkLogic side. Are you using MarkLogic 8.0-5? Erik Hennum From: general-boun...@developer.marklogi

Re: [MarkLogic Dev General] /node-client-api cannot get it working

2016-04-06 Thread Erik Hennum
equivalent POST requests to the roles endpoint using curl to see if it's a REST issue rather than a Node.js issue. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Alex

Re: [MarkLogic Dev General] Xquery : Empty Content

2016-04-18 Thread Erik Hennum
Hi, Pragya: If whitespace only appears in container elements and not in leaf elements, you can use node tests: if (empty($in-xml//*[empty(*) and exists(text())])) then ... Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] Search API total not equal to number of search results

2016-04-20 Thread Erik Hennum
ed as the last page. In this case, the start offset of the first empty page will be the accurate total. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of Danny Sinang [

Re: [MarkLogic Dev General] Not able to use indexes in cts:search

2016-05-06 Thread Erik Hennum
practice to use fn.subsequence(cts.search(...), 1, 2) instead of a [1 to 2] predicate. fn.subsequence() iterates lazily. A predicate is applied to all results (except where optimized away). Hoping that helps, Erik Hennum From: general-boun...@develope

Re: [MarkLogic Dev General] Regarding compilation of schema for validation.

2016-05-09 Thread Erik Hennum
will almost certainly be faster than an XSLT invocation. The other question is whether your Schematron compiler supports compiling an XSD. Hoping that helps, Erik Hennum From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] o

  1   2   3   4   >