Re: [MarkLogic Dev General] Wrong Behavior of Term-Query vs. Value-Query

2018-03-19 Thread Will Thompson
Hi Hubertus, I would not expect that behavior, so probably the best thing to do is contact ML support if you have not already done so. My understanding is that element value queries use the same index data structures under the hood as word/term queries, so I would not expect fewer results for a

Re: [MarkLogic Dev General] Field Word Queries using Search API

2018-03-02 Thread Will Thompson
Alan, It appears the behavior of search:parse() and cts:parse() are different in this respect. cts:parse() uses the individual word tokens in the query, the equivalent of an ORing them: cts:parse('by:(twain frost)', map:new(map:entry("by", cts:element-reference(xs:QName("name") => cts:e

Re: [MarkLogic Dev General] Rsync-Like DB Contents Comparison and Update?

2018-01-29 Thread Will Thompson
I'm not aware of anything out of the box, but when I have use timestamps for similar push/pull remote-sync applications. If every update is timestamped, then you can index that value on all servers, get the cts:max() before a sync, and return everything updated after that timestamp on the master

Re: [MarkLogic Dev General] Best Approach to Manage "Flags" That Might Change Within a Single Transaction

2017-12-07 Thread Will Thompson
Hi Eliot, I have found that trying to control a long batch process through a single long-running transaction is too much trouble because of the same issues you are having w.r.t. visibility of updates. I think it seems natural at first because XQuery is such a nice language, but the accumulation

Re: [MarkLogic Dev General] How to Do Equivalent of While true() Loop In ML?

2017-11-27 Thread Will Thompson
Eliot, Is the controller/while-loop transaction read-only (i.e.: is xdmp:request-timestamp() nonempty)? If it is, then I think you can be sure it's not holding locks. Otherwise, I would restructure that part of the application so that any transaction responsible for dispatching jobs doesn't mak

Re: [MarkLogic Dev General] What Might Cause Documents to Silently Not Be Created?

2017-11-09 Thread Will Thompson
Eliot, When you make the remote HTTP call, are you using one of the xdmp:http-XYZ functions? Since those functions return a payload describing the response condition and don't throw exceptions for most errors, is it possible that an HTTP response error condition is not being handled, resulting

Re: [MarkLogic Dev General] Full-text search and JSON

2017-11-08 Thread Will Thompson
} } > > Cheers > > On 11/8/17, 4:03 AM, "general-boun...@developer.marklogic.com on behalf of > Will Thompson" wthomp...@oconnors.com> wrote: > >> Hi Rob, >> >> Likewise! I think I just figured it out. I am excluding root in the word >> qu

Re: [MarkLogic Dev General] Full-text search and JSON

2017-11-07 Thread Will Thompson
ur document is not a binary node with > xdmp:node-kind(fn:doc("/test.json")/node()) . > > Best, > Rob > > Rob Szkutak > Senior Consultant > MarkLogic Corporation > www.marklogic.com > > From: general-boun...@developer.marklogic.com > on behal

[MarkLogic Dev General] Full-text search and JSON

2017-11-07 Thread Will Thompson
Is it possible to search generally against text tokens in JSON documents? All of the JSON-specific cts:queries require property names, and cts:word-query doesn't appear to match JSON documents. For example, if I have a document with URI "/test.json": { "id" : 1234, "text" : "The quick brown

Re: [MarkLogic Dev General] Custom search grammar

2017-02-01 Thread Will Thompson
Hi Oleksi, If it seems odd to you that MarkLogic continues to pressure you *not* to use the API they built, you are not alone. Erik, I don't think it's reasonable to suggest to customers only needing to extend or replace a small portion of Search API that they rewrite significant parts of it

[MarkLogic Dev General] Azure/Hyper-V virtual disk write cache policy

2017-02-01 Thread Will Thompson
In Azure or Hyper-V-based VMs, the write caching policy for a virtual disk always displays as enabled (and it can't be changed), regardless of whether or not the system hosting the virtual disk is really configured to cache writes. However, there is a second option underneath it to disable Windo

Re: [MarkLogic Dev General] MLCP export crashing with SEC-ROLEDNE

2016-12-08 Thread Will Thompson
for $o in map:keys($orphaned-map) let $permissions := map:get($orphaned-map, $o) return xdmp:document-remove-permissions($o, $permissions) -W > On Dec 8, 2016, at 6:10 PM, Will Thompson wrote: > > Hi Chris, > > That's entirely plausible and even likely. Do you know of a

Re: [MarkLogic Dev General] MLCP export crashing with SEC-ROLEDNE

2016-12-08 Thread Will Thompson
7;m not sure what would > happen if you had a permission (which has a role-id) and the role with that > id got removed. Maybe the above? > > - Chris > > On Thu, Dec 8, 2016 at 6:39 PM, Will Thompson wrote: > I am trying to export data from a Windows machine into an arc

[MarkLogic Dev General] MLCP export crashing with SEC-ROLEDNE

2016-12-08 Thread Will Thompson
I am trying to export data from a Windows machine into an archive to be imported into a Mac, but MLCP crashes. The error MLCP returns is nearly 250 lines, but this part seemed possibly relevant: "...Caused by: com.marklogic.xcc.exceptions.XQueryException: SEC-ROLEDNE: (err:FOER) Role does n

[MarkLogic Dev General] Recovering from forest disk space error

2016-11-10 Thread Will Thompson
I'm running a test to see how best to recover from an XDMP-MERGESPACE error. After forcing a forest to run out of space and getting the error, I created and attached a new forest with plenty of available space and created a merge blackout for the database. Rebalancing is enabled, so my expectati

Re: [MarkLogic Dev General] wildcard search false positive

2016-10-24 Thread Will Thompson
Hi Rob, Are you running the most recent update, 8.0-6? There were some wildcard-related bugfixes in that release, including this one: "40053: punctuation sensitive wildcarded document matching with cts:element-value-query might give incorrect results". It's unclear what exactly that fixes, but

[MarkLogic Dev General] Huge disparity in query performance before/after in-memory stands written to disk

2016-08-24 Thread Will Thompson
We monitor an ingestion process by polling MarkLogic and display the status in a browser UI. Near the end of ingestion and until in-memory stands are written to disk, one of these queries typically takes 5+ secs to run. However, once the stands are written to disk, the same query runs in under 5

Re: [MarkLogic Dev General] POST multiple documents in a single request

2016-05-17 Thread Will Thompson
content-type header > for each part to parse the particular part. > > Justin > >> On May 17, 2016, at 1:50 PM, Will Thompson wrote: >> >> Hi Geert, >> >> I think I finally have a test that correctly sends multipart/mixed >> (evidently curl reserv

Re: [MarkLogic Dev General] POST multiple documents in a single request

2016-05-17 Thread Will Thompson
ame from > your own HTTP app server too. Take a look at > <http://docs.marklogic.com/xdmp:multipart-decode>. > > Justin > > -- > Justin Makeig > Director, Product Management > MarkLogic > > >> On May 17, 2016, at 11:09 AM, Will Thompson wrote: &g

Re: [MarkLogic Dev General] POST multiple documents in a single request

2016-05-17 Thread Will Thompson
ames > attached. > > Cheers, > Geert > > On 5/17/16, 8:09 PM, "general-boun...@developer.marklogic.com on behalf of > Will Thompson" wthomp...@oconnors.com> wrote: > >> Is there a recommended method of posting multiple documents to a ML >> endpoint in one re

[MarkLogic Dev General] POST multiple documents in a single request

2016-05-17 Thread Will Thompson
Is there a recommended method of posting multiple documents to a ML endpoint in one request? Maybe this is a more general HTTP question, but I have tried several permutations of curl options, and unfortunately the only one that works on the ML side involves joining the documents together into a

[MarkLogic Dev General] Field weight rules for child with excluded parent

2016-04-25 Thread Will Thompson
The documentation on fields states "If a field has two or more elements with different weights and, if one of those elements is a child of another element, then the weight of the parent element is used and the weight of the child element is ignored." But it's not clear what happens when an ances

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

2016-04-01 Thread Will Thompson
As far as I know, you have to differentiate between insert and replace scenarios when using the xdmp:node- functions: doc("/my-doc.json")/xdmp:node-insert-child(object-node(), object-node { "PropName" : "PropValue" }/PropName) doc("/my-doc.json")/xdmp:node-replace(PropName, object-node { "P

Re: [MarkLogic Dev General] CPF pre-commit action?

2016-01-19 Thread Will Thompson
ny of the docs.. > > Kind regards, > Geert > > On 1/18/16, 6:33 PM, "general-boun...@developer.marklogic.com on behalf of > Will Thompson" wthomp...@oconnors.com> wrote: > >> Geert, >> >> I hadn't considered that, but it would definitely

Re: [MarkLogic Dev General] CPF pre-commit action?

2016-01-18 Thread Will Thompson
Cheers > > On 1/15/16, 5:06 PM, "general-boun...@developer.marklogic.com on behalf of > Will Thompson" wthomp...@oconnors.com> wrote: > >> Geert, >> >> We're using CPF because some steps may necessitate human intervention, in >> which case

Re: [MarkLogic Dev General] CPF pre-commit action?

2016-01-15 Thread Will Thompson
nt to have one less step in your pipeline that >> you want to do this? >> >> -Danny >> >> -Original Message- >> From: general-boun...@developer.marklogic.com >> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Will >> Thompson >> Sent: T

[MarkLogic Dev General] CPF pre-commit action?

2016-01-14 Thread Will Thompson
Is it possible to configure a CPF pipeline such that when a document is inserted, transformations are first executed on the document in a pre-commit stage, and if those complete successfully, then the transformation result is what's finally committed at that URI? And any remaining pipeline could

Re: [MarkLogic Dev General] API to get the executing function name and the xquery file

2015-12-30 Thread Will Thompson
None that I am aware of. I have seen this done, however, by throwing an exception in a try block, and using the catch block inspect the error XML to determine contextual information. try { error((), 'BOGUS-ERROR') } catch ($e) { ** get context from $e ** } -Will > On Dec 30, 2015, at 1:30

[MarkLogic Dev General] cts:element-value-query and phrase-throughs

2015-12-23 Thread Will Thompson
It appears element-value-queries do not abide phrase-throughs and phrase-arounds. I need to do something similar, but I'm not sure it's possible with word queries. For example: A man, a plan, a canal... I need to be sure this matches for the query "A man a plan a canal", but not any substrings

[MarkLogic Dev General] MLCP NullPointer exceptions importing archive

2015-10-30 Thread Will Thompson
I can't seem to avoid getting exceptions when importing an MLCP archive. It consists of a root folder and two ZIPs, each about 190MB, and it was exported from ML 8.0-3.2 on Windows using MLCP 1.3-3. I imported this into a Mac running the same versions of ML and MLCP. All of the source documents

[MarkLogic Dev General] Declarative rewriter variable usage

2015-10-27 Thread Will Thompson
I'm a little confused about what we're allowed to do with variables in the XML-based rewriter. There is an example in the documentation that suggests it's possible to concatenate variables with strings (or other variables?) by simply including the variable's reference: /app/$1 However, that do

Re: [MarkLogic Dev General] MarkLogic 8 on OSX 10.11

2015-10-16 Thread Will Thompson
Thanks, Harry! -Will > On Oct 16, 2015, at 12:16 PM, Harry Bakken wrote: > > Yep- works fine for me. Upgraded fine, installed fine as well. > > Harry > > On Thu, Oct 15, 2015 at 10:42 AM, Will Thompson > wrote: > Has anyone tested ML 8 on the latest version of

[MarkLogic Dev General] MarkLogic 8 on OSX 10.11

2015-10-15 Thread Will Thompson
Has anyone tested ML 8 on the latest version of OSX, 10.11 aka "El Capitan"? -Will ___ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general

Re: [MarkLogic Dev General] How to search run-in words?

2015-08-28 Thread Will Thompson
Yun, I'm not sure custom dictionaries will solve your problem. I think you may need to run an offline process that tries to discover all of the run-in words, and from there generate a thesaurus to expand run-in words to separated word tokens at query time. Of course, any new or updated document

Re: [MarkLogic Dev General] Range-index on document Property

2015-06-25 Thread Will Thompson
By calling /text() on the node with the range index you are probably short circuiting any potential performance optimization by forcing the evaluation of text() on every node in that sequence before sorting. Remove that function call. You can double check to see if the index optimization is happ

Re: [MarkLogic Dev General] Phrase query mismatch Marklogic 7

2015-05-27 Thread Will Thompson
It sounds like you want stemming set to "off" instead of "basic" -Will > On May 27, 2015, at 10:38 AM, Shashidhar Rao > wrote: > > Hi, > > I am querying for phrase "testing method" but it matches others such as "test > methods" along with "testing method". > > Why is that it is matching oth

[MarkLogic Dev General] Index inclusion rules for elements with and without attribute values

2015-05-06 Thread Will Thompson
I couldn't find an answer in the documentation regarding the specific case where conflicting rules are present for both an element without an attribute and for the same element with an attribute. So if a word index excludes root, includes , and excludes , should I expect cts:search(//doc, cts:w

Re: [MarkLogic Dev General] Constructing JSON objects

2015-03-16 Thread Will Thompson
I tend to avoid declaring functions or variables in any namespace that I >> know other code is using. But you're doing it with your eyes open, and >> that's probably ok. Someday a server update may conflict. But if that >> happens, I'm sure you'll

Re: [MarkLogic Dev General] Constructing JSON objects

2015-03-12 Thread Will Thompson
; > Thanks > Sudhakar > > > > On 3/11/15, 6:52 PM, "Erik Hennum" wrote: > >> 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 sa

[MarkLogic Dev General] Constructing JSON objects

2015-03-11 Thread Will Thompson
Is there a nice way to construct a JSON object similar to how maps can be constructed? Typically I would just do it this way: xdmp:to-json( map:new(( map:entry('x', 1), map:entry('y', 2) ))) Except that order is important in this specific scenario, and this ruins ordering. -Will _

[MarkLogic Dev General] Lexicon functions and cts:score

2015-02-10 Thread Will Thompson
If I pass a cts:query to a lexicon function I can choose to sort the results using the search scores, but is is there a way to retreive that score value (like cts:score)? Is UDF the only option? -W ___ General mailing list General@developer.marklogic.c

Re: [MarkLogic Dev General] Search API: Can't unparse after extension?

2015-01-28 Thread Will Thompson
eloper Community Manager > MarkLogic Corporation > > > From: Will Thompson > Reply-To: MarkLogic Developer Discussion > Date: Wednesday, January 28, 2015 at 3:47 PM > To: MarkLogic Developer Discussion > Subject: [MarkLogic Dev General] Search API: Can't unparse after

[MarkLogic Dev General] Search API: Can't unparse after extension?

2015-01-28 Thread Will Thompson
(Using ML 7.0-4.1) I added an extension to my Search API options to transform terms into field-word-queries: declare function my:search-term( $ps as map:map, $term as element()?) as schema-element(cts:query) { document { cts:field-word-query( 'my-field', sdev:current($ps),

Re: [MarkLogic Dev General] Schema validation incorrect for no-namespace document

2014-12-09 Thread Will Thompson
the doc it does. Since namespacing the docs (there aren't many) and the schema does work, that's my current workaround (and probably better practice anyway). Let me know if you can't reproduce it. Thanks for following up! -Will > On Dec 9, 2014, at 3:25 PM, Mary Holstege

[MarkLogic Dev General] Schema validation incorrect for no-namespace document

2014-12-09 Thread Will Thompson
I recently ran into some issues validating a no-namespace document. The schema was updated, which should have caused the document to fail validation, but it didn't. I have been using xdmp:expanded-tree-cache-clear() following schema updates, but neither that nor a server restart had any affect.

Re: [MarkLogic Dev General] Diacritic-insensitive collation ignored

2014-10-29 Thread Will Thompson
I see where you created an operator to sort using the collation, but I don't see where it is invoked. I.e.: I think you have to add "sort:title" to your search string. -Will On Oct 28, 2014, at 12:34 PM, Hasegawa, Margarete wrote: Hi,  I'm working on an a

Re: [MarkLogic Dev General] Java webservice/XCC security

2014-08-18 Thread Will Thompson
ly don't need to call > xdmp:lock-for-update, because lock contention should be vanishingly rare. > > -- Mike > > On 18 Aug 2014, at 15:16 , Will Thompson wrote: > >> A Java application will somehow need to securely be allowed to insert >> documents into the d

[MarkLogic Dev General] Java webservice/XCC security

2014-08-18 Thread Will Thompson
A Java application will somehow need to securely be allowed to insert documents into the dbs of its callers, which are all other ML databases (several developers, QA, and production). ML executes http-get calls to Java with parameters for the jobs, Java does a bunch of work (this takes a while),

Re: [MarkLogic Dev General] Guides on database design for multi-tenancy?

2014-07-09 Thread Will Thompson
Just wanted to add one note about sharing a schema database. Although schema validation is explicit, schema type assessment is implicit and automatic. If two schemas defined conflicting types on the same element name, I assume that would throw a dynamic error. If every schema is namespaced, thou

Re: [MarkLogic Dev General] QConsole lost data

2014-06-06 Thread Will Thompson
ole supports import and export. Maybe you could > trick it into taking one of your backup files as an import? The exports seem > to have no namespace, but I didn't look into other differences. > > -- Mike > > On 5 Jun 2014, at 15:04 , Will Thompson wrote: > >> All o

Re: [MarkLogic Dev General] QConsole lost data

2014-06-05 Thread Will Thompson
icate workspace? I dumped the XML to my filesystem, just in case anything goes awry. -W From: general-boun...@developer.marklogic.com on behalf of Will Thompson Sent: Thursday, June 5, 2014 3:57 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLo

Re: [MarkLogic Dev General] QConsole lost data

2014-06-05 Thread Will Thompson
possible that it just switched you to a different workspace? -- Mike On 5 Jun 2014, at 12:36 , Will Thompson wrote: > I just noticed that on my dev QConsole (on ML 7.0-1 OSX) workspaces and tabs > appear to have somehow reverted to a state from many months ago. Nothing > significant

[MarkLogic Dev General] QConsole lost data

2014-06-05 Thread Will Thompson
I just noticed that on my dev QConsole (on ML 7.0-1 OSX) workspaces and tabs appear to have somehow reverted to a state from many months ago. Nothing significant has occurred directly relating to ML. The only thing out of the ordinary is that Chrome recently crashed, after which I restarted it a

Re: [MarkLogic Dev General] Error getting tuple array-size

2014-05-12 Thread Will Thompson
t; cts:value-tuples( >cts:element-reference(xs:QName('prop:last-modified')))[1] > cast as json:array) > > BTW xdmp:type seems to agree that the output from cts:value-tuples is already > a json:array, returning QName("http://marklogic.com/xdmp/json";, "array&q

Re: [MarkLogic Dev General] Error getting tuple array-size

2014-05-12 Thread Will Thompson
This is interesting. Even though the return value is reported as a json:array, the function works if it’s coerced into a json:array before calling: let $tuple as json:array := cts:value-tuples($some-cts-reference)[1] return json:array-size($tuple) => 1 On May 12, 2014, at 12:15 PM, W

[MarkLogic Dev General] Error getting tuple array-size

2014-05-12 Thread Will Thompson
let $tuple := cts:value-tuples($some-cts-reference)[1] return xdmp:describe($tuple) => json:array(...) return json:array-size($tuple) => [1.0-ml] XDMP-ARGTYPE: (err:XPTY0004) json:array-size(json:array(...)) -- arg1 is not of type json:array? Am I missing something, or should I contact support?

Re: [MarkLogic Dev General] ML-namespaced elements change map subtraction behavior

2014-05-02 Thread Will Thompson
:new(map:entry('t', /@id)) > - map:new(map:entry('t', /@id))) > ! map:get(., map:keys(.))/.. > => > > There might be an argument for map operations to use deep-equal when > comparing nodes. No doubt it would slow things down, though. > > -- Mike &

[MarkLogic Dev General] ML-namespaced elements change map subtraction behavior

2014-05-02 Thread Will Thompson
It appears that when ML-specific elements are stored in in maps, they don't subtract as I would expect: map:new(map:entry('x', )) - map:new(map:entry('x', )) =>                        If the element name or namespace is changed, or the value is stored in a non-ML-related container ele

Re: [MarkLogic Dev General] Path range indexes and fragments

2014-04-25 Thread Will Thompson
quot; instead of "must" because the server doesn't > enforce that rule actively, but behaves unpredictably if it is not followed. > > -- Mike > > On 24 Apr 2014, at 09:21 , Will Thompson wrote: > >> We’re noticing some odd reindexing and querying beha

[MarkLogic Dev General] Path range indexes and fragments

2014-04-24 Thread Will Thompson
We’re noticing some odd reindexing and querying behavior, and I’m curious if there’s anything fundamentally wrong about inserting documents like: value … with a fragment root set on , and a path range index for things/thing-type/thing. A cts:values query on that path reference ret

Re: [MarkLogic Dev General] timeouts

2014-04-14 Thread Will Thompson
There’s a “request timeout” setting above those two in app server configurations. Also, several other timeout settings may apply in Groups > Default > Configure. -Will On Apr 14, 2014, at 9:05 AM, Gary Larsen wrote: Trying to run a very long query, but get a tim

Re: [MarkLogic Dev General] Is there a performance penaly for using long directory and document uris?

2014-04-04 Thread Will Thompson
t; any performance issues? > > -Original Message- > From: general-boun...@developer.marklogic.com > [mailto:general-boun...@developer.marklogic.com] On Behalf Of Will Thompson > Sent: Friday, April 04, 2014 2:27 PM > To: MarkLogic Developer Discussion > Subject: Re: [MarkLo

Re: [MarkLogic Dev General] Is there a performance penaly for using long directory and document uris?

2014-04-04 Thread Will Thompson
I think the short answer is yes due to lock contention on the directory fragments. I think this can be mitigated somewhat by manually creating the directory fragments rather than turning on automatic directory creation. For detailed information on this topic, I always refer to Mike’s blog post:

Re: [MarkLogic Dev General] false match on cts:element-value-query

2014-03-25 Thread Will Thompson
Do you have the element-value-positions index turned on (which, IIRC, may also require that word-positions and element-word-positions be enabled)? Depending on the structure of your documents, I think this may be necessary for completely accurate unfiltered queries. -W On Mar 25, 2014, at

Re: [MarkLogic Dev General] Export single XML package from Management Console?

2014-01-21 Thread Will Thompson
;fubar'), > xdmp:describe(package:get-package('fubar', 'application/xml')) > => > > > -- Mike > > On 21 Jan 2014, at 12:05 , Will Thompson wrote: > >> We’re preparing to update to ML7, and one significant change from ML6 is >> th

[MarkLogic Dev General] Export single XML package from Management Console?

2014-01-21 Thread Will Thompson
We’re preparing to update to ML7, and one significant change from ML6 is that configuration packages are now output as ZIPs containing multiple XML files. We currently rely on source control to compare versions of these packages. Is it still possible to get the single XML file in ML7? -Will __

Re: [MarkLogic Dev General] rest-user needs xdmp:get-server-field to execute GET?

2014-01-16 Thread Will Thompson
need the get-server-field privilege. > > Charles > > > > On 01/16/2014 02:55 PM, Will Thompson wrote: >> Charles - >> >> Sorry, that’s correct: rest-reader. This is on 6.0-4. What we’re noticing is >> that none of the Windows machines’ rest-reader-interna

Re: [MarkLogic Dev General] rest-user needs xdmp:get-server-field to execute GET?

2014-01-16 Thread Will Thompson
ar about this kind of bug. Are you in an upgraded scenario? > > Charles > > > > > On 01/16/2014 01:46 PM, Will Thompson wrote: >> It appears that out of the box a user with just the rest-user role does not >> have sufficient privileges to make a GET call t

[MarkLogic Dev General] rest-user needs xdmp:get-server-field to execute GET?

2014-01-16 Thread Will Thompson
It appears that out of the box a user with just the rest-user role does not have sufficient privileges to make a GET call to a REST API endpoint. We had to give our users the xdmp:get-server-field privilege, otherwise endpoint-util.xqy throws an exception from eput:get-server-field(). Is it poss

Re: [MarkLogic Dev General] ML7 excludes packaging library?

2014-01-15 Thread Will Thompson
e documentation for ML7 is wrong. It's under a new namespace, and takes a parameter, package:create('somename'), then package:install('somename'). The documentation is unfortunate. On Wed, Jan 15, 2014 at 2:59 PM, Will Thompson <wthomp...@jonesmcclure.com> wrote: We’re

[MarkLogic Dev General] ML7 excludes packaging library?

2014-01-15 Thread Will Thompson
We’re preparing to update our databases to ML7, and I’m having some trouble figuring out what happened to package:install(). We use it in a couple of our scripts, but /MarkLogic/package/package.xqy appears to be missing from the ML filesystem modules. It’s still listed in the ML7 documentation a

Re: [MarkLogic Dev General] Single sign-on for MarkLogic HTTP app servers?

2014-01-10 Thread Will Thompson
I just wanted to ditto this request. We would also find something like this very useful. -Will On Jan 7, 2014, at 12:03 PM, David Sewell wrote: > Before possibly reinventing a wheel, I'm wondering if anyone who uses > application-level authentication on HTTP app servers has an elegant way of

Re: [MarkLogic Dev General] xdmp:estimate overcounting

2013-11-20 Thread Will Thompson
Mike, Scratch that, I think I got it working. Thanks. -Will On Nov 20, 2013, at 3:43 PM, Will Thompson wrote: > Geert, > > I set fragment-frequency, just in case, but as > far as I can tell it is the default (6.0-4). > > Mike, > > I tried both and-ing the eleme

Re: [MarkLogic Dev General] xdmp:estimate overcounting

2013-11-20 Thread Will Thompson
nt to > cts:element-query(xs:QName('doc'), cts:and-query(()). Call cts:element-values > with cts:and-query of that new query and your user query. > > I'm not sure if that will be 100% effective in every situation, but it's > worth a try. > > -- Mike > &g

Re: [MarkLogic Dev General] xdmp:estimate overcounting

2013-11-20 Thread Will Thompson
("dog > cat rat", ("lang=en"), 1) > > > > 5166487143365525844 > word("dog") > > > 12545744176132597186 > word("cat") > > > 12285550591485045727 > word("rat") >

Re: [MarkLogic Dev General] xdmp:estimate overcounting

2013-11-19 Thread Will Thompson
? If you can run that with ML7 > that is even more useful. > > -- Mike > > On 19 Nov 2013, at 12:43 , Will Thompson wrote: > >> I’m trying to determine why some search result estimates are overcounted. >> Documents generally look like: >> >> >&g

[MarkLogic Dev General] xdmp:estimate overcounting

2013-11-19 Thread Will Thompson
I’m trying to determine why some search result estimates are overcounted. Documents generally look like: Fragment root is set on (and no ancestors or descendants of ). count(//doc) = xdmp:estimate(//doc) => true. The searchable expression is xdmp:directory((‘dir1’,

Re: [MarkLogic Dev General] MST with variable number of updates

2013-11-04 Thread Will Thompson
LD and > $NEW would have the same values throughout. I'd write the version-move code > so that it moves the oldest version from $OLD to $NEW. That way it doesn't > need to know anything about the existing versions. But if that's difficult > for some reason, you co

[MarkLogic Dev General] MST with variable number of updates

2013-11-04 Thread Will Thompson
We have a use case where content editors need to ³rename" files in a DLS-managed system. This seemed like an ideal fit for multi-statement transactions, so that we could iterate through the document history, replay the check-ins using the new URI, and delete the old document in one atomic step. How

Re: [MarkLogic Dev General] Search case insensitive

2013-11-01 Thread Will Thompson
Sundar – The should be nested within :    case-insensitive    diacritic-insensitive    punctuation-insensitive            -Will From: Sundaravadivel Kandasamy Reply-To: MarkLogic Discussion Date: Friday, November

[MarkLogic Dev General] cts:highlight and word index-excluded elements

2013-10-09 Thread Will Thompson
In ML 6.0-4, using a cts:word-query, cts:highlight is highlighting text in elements that are excluded from the word index. Since cts:highlight works similarly to cts:search, I assumed those would not be matched. And I think I remember testing this back in 5.0, and they were excluded. What is the ex

[MarkLogic Dev General] SSD and fast data directory

2013-10-01 Thread Will Thompson
The example in ML's docs suggest an 8-core server with 4 forests, all sharing one SSD fast data directory. Is it fair to assume that even under heavy load the single-threaded speed of an SSD will always outperform the 4 forests of magnetic disks? It seems like there might be scenarios where having

Re: [MarkLogic Dev General] Resolving relative paths in XSLT with xdmp:import-module

2013-09-25 Thread Will Thompson
.marklogic.com [mailto:general- >> boun...@developer.marklogic.com] Namens Will Thompson >> Verzonden: dinsdag 24 september 2013 3:50 >> Aan: MarkLogic Discussion >> Onderwerp: [MarkLogic Dev General] Resolving relative paths in XSLT with >> xdmp:import-module >> >> An XSLT

[MarkLogic Dev General] Resolving relative paths in XSLT with xdmp:import-module

2013-09-23 Thread Will Thompson
An XSLT is created dynamically in ModuleRoot/X/Y/Z/A.xqy and executed using xdmp:xslt-eval(). A.xqy imports B.xqm (using xdmp:import-module) and C.xsl, both using relative paths. B.xqm resolves to ModuleRoot/B.xqm, but C.xsl resolves ModuleRoot/X/Y/Z/C.xsl. If an XSLT file is created and executed u

Re: [MarkLogic Dev General] Function streaming bug or feature?

2013-08-23 Thread Will Thompson
/ operator, consider either the XQuery 3.0 ! operator >(which doesn't sort) or use a for to preserve the ordering. > > >Hoping that's useful, > > >Erik Hennum > > >From: general-boun...@developer.marklogic.com >[ge

[MarkLogic Dev General] Function streaming bug or feature?

2013-08-23 Thread Will Thompson
I have been making function calls at the end of xpath statements as a kind of best practice to hedge against the possibility that part of the path may resolve to empty (and prevent calling a function that doesn't handle empty): a/b/x:y(.) - however, I recently came across a scenario where this is a

Re: [MarkLogic Dev General] Xpath expression issue

2013-08-12 Thread Will Thompson
Sorry, I misunderstood what you were trying to do. Similar to David's suggestion: let $replacenode-qname  :=  $replace_config/adminfunctionality/replace/replacenode/xs:Qname(string()) for $eachelement in doc($uris)//*[node-name(.)=$replacenode-qname] -Will From: Will Thompson &l

Re: [MarkLogic Dev General] Xpath expression issue

2013-08-12 Thread Will Thompson
Gurbeer - Use node-name() to get and compare QNames: let $replacenode-qname  :=  $replace_config/adminfunctionality/replace/replacenode/node-name(.) for $eachelement in doc($uris)//*[node-name(.)=$replacenode-qname] -Will From: , Gurbeer Reply-To:

Re: [MarkLogic Dev General] xdmp:save with doctype declaration

2013-08-09 Thread Will Thompson
Sini -  I think you need to include the public identifier:       -//SUB//DTD DocBook V4.4-Based Subset V0.1//EN     docbook-sub.dtd         no   -Will From: sini narayanan Reply-To: MarkLogic Discussion Date: Thursday, Au

Re: [MarkLogic Dev General] fn:replace in QConsole

2013-07-30 Thread Will Thompson
st"   return fn:replace($url, "/search?q=", "/v1/search?options=appl&q=")   Can you spot anything else I might be doing wrong?   Thanks for your reply,   Zach From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of

Re: [MarkLogic Dev General] fn:replace in QConsole

2013-07-30 Thread Will Thompson
Carrot and dollar are beginning of string/end of string anchors. So the _expression_ "^/search?q=$" will only match if there is no text preceding or following "/search?q=". If you want to allow text to match following the _expression_, then remove the dollar anchor: "^/search?q=". Then it can m

Re: [MarkLogic Dev General] xdmp:http-put to REST Client API document management endpoint

2013-07-30 Thread Will Thompson
gt;From: general-boun...@developer.marklogic.com >[general-boun...@developer.marklogic.com] on behalf of Will Thompson >[wthomp...@jonesmcclure.com] >Sent: Monday, July 29, 2013 5:29 PM >To: MarkLogic Discussion >Subject: [MarkLogic Dev General] xdmp:http-put to REST Client API >docume

[MarkLogic Dev General] xdmp:http-put to REST Client API document management endpoint

2013-07-29 Thread Will Thompson
Is there another way to do this, or do I have to use xdmp:quote? xdmp:http-put( 'https://localhost:8012/v1/documents?uri=/mydoc.xml', user pass { xdmp:quote(My document) } ) 0Will ___ General mailing list General@deve

Re: [MarkLogic Dev General] SearchAPI using search:search()

2013-07-15 Thread Will Thompson
Sini - Your first call to search:search will return at most 10 results (I think), the default. Therefore $no-of-pages will always be one (unless it returns 0 results). Then the second call to search:search asks for 1000 results, which is a very high number. This is likely your problem. Do you

Re: [MarkLogic Dev General] ML Transactions

2013-05-10 Thread Will Thompson
The missing context error is from the function call with missing parens: "bundle:deletetempdir" should be "bundle:deletetempdir()". The evals will force those functions to execute in separate transactions; however, here it's not necessary to invoke xdmp:commit() if you are not running in an explici

Re: [MarkLogic Dev General] Maximum size for a map?

2013-05-07 Thread Will Thompson
- >--- >David Lee >Lead Engineer >MarkLogic Corporation >d...@marklogic.com >Phone: +1 812-482-5224 >Cell: +1 812-630-7622 >www.marklogic.com > > >-Original Message- >From: general-boun...@developer.marklogic.com >[mailto:general-boun...@develop

Re: [MarkLogic Dev General] Maximum size for a map?

2013-05-07 Thread Will Thompson
nd updating.. > >Cheers, >Geert > >> -Oorspronkelijk bericht- >> Van: general-boun...@developer.marklogic.com [mailto:general- >> boun...@developer.marklogic.com] Namens Will Thompson >> Verzonden: dinsdag 7 mei 2013 19:18 >> Aan: MarkLogic Develope

Re: [MarkLogic Dev General] Slow lexicon performance for limited user

2013-05-07 Thread Will Thompson
uld work around >it. But I think you should open a support case too. This might be a bug, >or at least a good area for optimization work. > >-- Mike > >On 26 Mar 2013, at 12:57 , Will Thompson >wrote: > >> That's correct. The values are from a range index

Re: [MarkLogic Dev General] Maximum size for a map?

2013-05-07 Thread Will Thompson
f you describe the nature of the lookup we can brainstorm other ideas. > >Yours, >Damon > >-- >Damon Feldman >Sr. Principal Consultant, MarkLogic > > >-Original Message- >From: general-boun...@developer.marklogic.com >[mailto:general-boun...@developer.

Re: [MarkLogic Dev General] Maximum size for a map?

2013-05-06 Thread Will Thompson
7;d also have to be very careful about >updating the map, partly because of the size and also because server >fields do not offer much in the way of memory protection. Depending on >your needs you might be able to do some sort of A-B switching when you >need to update the map, or develop

  1   2   3   >