Re: [MarkLogic Dev General] Calling Unix/Perl scripts from Xquery

2012-06-19 Thread Geert Josten
Hi Arti, At present: no, not directly. But you could hook them up behind an old-fashion CGI server perhaps (limited to localhost access I guess), and do HTTP requests to them.. Kind regards, Geert *Van:* general-boun...@developer.marklogic.com [mailto:

Re: [MarkLogic Dev General] issue creating facet in search

2012-06-19 Thread Geert Josten
Hi Amit, Since you are talking about constraints, I’m guessing you are using search:search or related functionality? Yes, you must have a range index to be able to retrieve facet values. In your case it would be an attribute range index of type string. You will need to add it through the admin

Re: [MarkLogic Dev General] Collection operations performance

2012-05-31 Thread Geert Josten
Hi John, Not sure where you read that creating a collection would be resource 'intensive'. Working with collections should actually be pretty fast. I think there is something else in your code that is slowing things down. I'm suspecting the xdmp:value could be the cause of this. Can you elaborate

Re: [MarkLogic Dev General] Splitting documents using Information Studio

2012-05-30 Thread Geert Josten
Hi Gnanaprakash, Let me guess, you are splitting the documents in the transformation phase? With the current design it works best if you would customize one of the collectors to do the splitting there. There are ways around doing it in the Transformation phase, but they are less elegant..

Re: [MarkLogic Dev General] getting MarkLogic to execute functions in parallel

2012-05-23 Thread Geert Josten
Hi Ryan, From the top of my head I can think only of one other option, which I haven’t tried myself yet. I recently noticed this result option ( http://community.marklogic.com/pubs/5.0/apidocs/Ext-6.html#xdmp:eval), which should be used in combination with xdmp:spawn if I understand correctly.

Re: [MarkLogic Dev General] SVC-BAD error when attempting to launch config manager or dashboard

2012-05-21 Thread Geert Josten
. De : general-boun...@developer.marklogic.com [general- boun...@developer.marklogic.com] de la part de Geert Josten [geert.jos...@dayon.nl] Date d'envoi : lundi 14 mai 2012 21:46 À : MarkLogic Developer Discussion Objet : Re: [MarkLogic Dev General] SVC-BAD error when attempting

Re: [MarkLogic Dev General] How to test for JavaScript objects

2012-05-18 Thread Geert Josten
Hi Tim, You would need code that runs on client-side. Insert JavaScript logic in the head of the page that does an AJAX call to ML, or have JavaScript logic add this information to any submit url or form you have on your page.. Kind regards, Geert -Oorspronkelijk bericht- Van:

Re: [MarkLogic Dev General] Multilanguage search in marklogic

2012-05-17 Thread Geert Josten
Hi Yashmeet Make sure your content is properly ‘tagged’ for the correct languages. You can do that by making sure there is a correct xml:lang attribute on the language-specific parts of the content. If you don’t provide it, MarkLogic adds one on the root element itself, referring to the default

Re: [MarkLogic Dev General] SVC-BAD error when attempting to launch config manager or dashboard

2012-05-14 Thread Geert Josten
Hi Patrice, Did you upgrade from an earlier version, or was it a clean install? And are you running 64-bit version? Kind regards, Geert *Van:* general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] *Namens *patrice.god...@orange.com *Verzonden:* maandag

Re: [MarkLogic Dev General] Bug in cts:element-words? (was: Term with same stem)

2012-05-13 Thread Geert Josten
can get that fixed ;) -Danny From: general-boun...@developer.marklogic.com [general- boun...@developer.marklogic.com] On Behalf Of Geert Josten [geert.jos...@dayon.nl] Sent: Saturday, May 12, 2012 8:52 AM To: MarkLogic Developer Discussion Subject

Re: [MarkLogic Dev General] Bug in cts:element-words? (was: Term with same stem)

2012-05-13 Thread Geert Josten
1.3 sec running over 150k words, not bad at all! -Oorspronkelijk bericht- Van: Geert Josten [mailto:geert.jos...@dayon.nl] Verzonden: zondag 13 mei 2012 10:32 Aan: MarkLogic Developer Discussion Onderwerp: RE: [MarkLogic Dev General] Bug in cts:element-words? (was: Term with same

Re: [MarkLogic Dev General] xdmp:document-get and file location

2012-05-12 Thread Geert Josten
Hi Jakob, I have this helper function for that purpose. It uses the xdmp:modules-root that Mike suggests as basis, and don't some other little trick to complete it: declare function tw:get-modules-path($path) { fn:resolve-uri($path,

[MarkLogic Dev General] Bug in cts:element-words? (was: Term with same stem)

2012-05-12 Thread Geert Josten
Curious how well the idea of Danny would perform, I thought to apply it to one of my test databases with a fair number of tweets (roughly 400K last time I checked). I had to rewrite cts:words to cts:element-words since I have no words lexicon. But it breaks with me. Did I hit a bug? let $map :=

Re: [MarkLogic Dev General] Need to Remove spaces, punctuations, parens and ect., from the given string (need to remove all character other than A-Z and 0-9)

2012-05-10 Thread Geert Josten
Hi Santhosh, A way different approach could be using cts:tokenize. It splits the string into a sequence of typed values. String are returned as cts:word, punctuation as cts:punctionation, etc. I used it to split text into words, and apply some normalization on the tokens: for $word in

Re: [MarkLogic Dev General] efficient use search:search for facetting

2012-05-10 Thread Geert Josten
Hi Jakob, There is no flag or option that you can supply to search:search that makes it do what you want. And even if it would, it would have to do a double call itself too. Since search:search is such fast, I don't think it does any harm to call it twice. Just make sure you skip snippeting, and

Re: [MarkLogic Dev General] Mark Logic World

2012-05-10 Thread Geert Josten
Mark Logic World Hi Jon, Eric was working on that, but not sure it will be publicly available. Kind regards, Geer *Van:* general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] *Namens *Jonathan Cook *Verzonden:* donderdag 10 mei 2012 10:25 *Aan:*

Re: [MarkLogic Dev General] Mark Logic World

2012-05-10 Thread Geert Josten
an email with access info for ML World stuff. I imagine everyone should be getting it soon. On Thu, May 10, 2012 at 10:05 AM, Geert Josten geert.jos...@dayon.nl wrote: Hi Jon, Eric was working on that, but not sure it will be publicly available. Kind regards, Geer *Van:* general-boun

Re: [MarkLogic Dev General] Mark Logic World

2012-05-10 Thread Geert Josten
You're an award winning non-participant... I bet someone can hook you up. On May 10, 2012 11:45 AM, Geert Josten geert.jos...@dayon.nl wrote: Not as non-visitor? :-/ *Van:* general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] *Namens *Harry B. *Verzonden

Re: [MarkLogic Dev General] The value of @total is not right

2012-05-09 Thread Geert Josten
Hi Sunny, That is a known 'issue'. It is because search results are counted in so-called 'unfiltered' mode for performance reasons. It uses xdmp:estimate under the hood. Apparently you are doing a search that requires filtering of search results. Can you give some more details about your search

Re: [MarkLogic Dev General] The value of @total is not right

2012-05-09 Thread Geert Josten
--- :) return search:search($search-condition,$options,$page-size * ($page - 1)+1,$page-size) }; Thanks, Sunny Wang01 -Original Message- From: general-boun...@developer.marklogic.com [mailto:general- boun...@developer.marklogic.com] On Behalf Of Geert

Re: [MarkLogic Dev General] ML in the Browser

2012-05-08 Thread Geert Josten
Hi Frank, Well, actually you don't need to learn Java at all to work with MarkLogic. You can do everything in XQuery (and some client-side JavaScript perhaps). It runs on server-side though. I happen to know that XQIB runs on a cross-compiled copy of the MXQuery XQuery-parser. There is no such

Re: [MarkLogic Dev General] ML in the Browser

2012-05-08 Thread Geert Josten
browser editor. I am currently trying to use and understand xopus (which is again javascript). Regards, Frank -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com [mailto:general- boun...@developer.marklogic.com] Namens Geert Josten Verzonden: dinsdag 8 mei 2012 10:28

Re: [MarkLogic Dev General] How to get max value in ML

2012-05-08 Thread Geert Josten
Hi Danny, Can you elaborate on what you exactly mean? Given a sequence, you can just use fn:max() to get the highest value. If you want to determine the highest value that occurs anywhere in the database, you can use cts:values with a descending order and limit of 1. The first and single result

Re: [MarkLogic Dev General] How to get max value in ML

2012-05-08 Thread Geert Josten
was hoping there would be an ML function out there that would tell me the max unsigned long value. Regards, Danny On Tue, May 8, 2012 at 9:54 AM, Geert Josten geert.jos...@dayon.nl wrote: Hi Danny, Can you elaborate on what you exactly mean? Given a sequence, you can just use fn:max() to get

Re: [MarkLogic Dev General] How to get max value in ML

2012-05-08 Thread Geert Josten
at 10:04 AM, Geert Josten geert.jos...@dayon.nl wrote: Hi Danny, There is no pre-declared constant as far as I know if that is what you mean. But I’m sure it follows the specs of the XML Schema standard. Are you sure you want search:search to return so many results in one call? It is memory

Re: [MarkLogic Dev General] How to get max value in ML

2012-05-08 Thread Geert Josten
to a function to get the time spent by a user per book, chapter or subject. Time spent is the aggregate value. Regards, Danny On Tue, May 8, 2012 at 10:15 AM, Geert Josten geert.jos...@dayon.nl wrote: Hi Danny, Can you elaborate on the aggregate values? That is probably quite in-efficient too

Re: [MarkLogic Dev General] Invalid 'order by' value

2012-05-07 Thread Geert Josten
Hi Danny, Sounds like your SessionId isn’t unique within $searchResults. Either get only one of them, or rearrange your FLWOR to compensate for that.. Kind regards, Geert *Van:* general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] *Namens *Danny

Re: [MarkLogic Dev General] Log errors

2012-05-07 Thread Geert Josten
Hi Gary, If you have support, you can contact supp...@marklogic.com to discuss best solution for the corrupt index files. Personally, doesn’t sound like expiration of your license was the case of the problems. You are talking about restoring the database, do you actually mean from backups? In

Re: [MarkLogic Dev General] xdmp:zip-manifest bug?

2012-04-20 Thread Geert Josten
Hi Will, Sounds like a bug to me. Send a message to supp...@marklogic.com. Make sure to attach a zip that shows the problem. The default encoding of the app server might be relevant too. Kind regards, Geert *Van:* general-boun...@developer.marklogic.com [mailto:

Re: [MarkLogic Dev General] xdmp:zip-manifest bug?

2012-04-20 Thread Geert Josten
PS: as temporary work-around I guess you will indeed have to make sure to strip out all diacritics from the filenames inside the zip.. :-/ *Van:* Geert Josten [mailto:geert.jos...@dayon.nl] *Verzonden:* vrijdag 20 april 2012 8:34 *Aan:* 'MarkLogic Developer Discussion' *Onderwerp:* RE

Re: [MarkLogic Dev General] XDMP-CANCELED

2012-04-18 Thread Geert Josten
Hi Selva, It is an indication that the request was terminated (canceled) from outside the request, so you cannot catch that exception from inside the request itself. It could be that the user in the browser canceled the request (by interrupting the load), or some admin killed the task on the

Re: [MarkLogic Dev General] New Module for Memory Operations on XML

2012-04-17 Thread Geert Josten
Where can we find the code itself? And how much does it resemble the kind of updates allowed in XQUF? By the way, was kind of hoping MarkLogic would allow applying the xdmp node update functions (or copies of those) to in memory structures as well. Direct manipulation of the tree, without

Re: [MarkLogic Dev General] another cts query question

2012-04-16 Thread Geert Josten
Hi Gary, I guess it is easiest to calculate date ranges for that. The first would match timestamps between xs:dateTime(fn:concat(fn:current-date(),”T00:00:00Z”)) and xs:dateTime(fn:concat(fn:current-date() + xs:dayTimeDuration(“P1D”),”T00:00:00Z”)). You can use a cts:and-query on two

Re: [MarkLogic Dev General] Retrieving a list of users

2012-04-10 Thread Geert Josten
Hi Steve, I wrote the following functions a while back to do just that: (: There is unfortunately no nice way to retrieve a list of all user id's.. :) declare function lib:user-names() as xs:string* { lib:user-names(xdmp:security-database()) }; declare function

Re: [MarkLogic Dev General] Count the number of documents in each range entry.

2012-04-10 Thread Geert Josten
You could leverage search:search to get it back as if it were just another facet, but you’d be typing a lot more, just for the facet definition, and under the hood, any strategy would end up doing exactly what you are doing already I guess. Your approach is essentially the way to go. Kind

Re: [MarkLogic Dev General] xdmp:spawn

2012-04-04 Thread Geert Josten
Hi Amit, I notice a few things about your call: First, you pass in a modules option with a dynamic value derived from the expression ‘/spell’. That either results in an empty value, or in a lot of xml. I’m not sure that is your purpose. It makes most sense I guess to just omit the option,

Re: [MarkLogic Dev General] Another Corona Question

2012-04-02 Thread Geert Josten
Hi Randy, Can you tell us again with which user you are running Corona? Did you try setting the Corona App Server to application-level with the admin user? What are the results then? Kind regards, Geert *Van:* general-boun...@developer.marklogic.com [mailto:

Re: [MarkLogic Dev General] Another Corona Question

2012-04-02 Thread Geert Josten
to a file system that contains the data. The previous e-mail may indicate there is a permission problem but I get results back in other cases in Query Console. Thanks much for the help. Randy On 4/2/2012 12:06 PM, Geert Josten wrote: Hi Randy, Can you tell us again with which user you are running

Re: [MarkLogic Dev General] Partial Match Search Takes More time in MarkLogic

2012-03-28 Thread Geert Josten
This question has been replied on stackoverflow: http://stackoverflow.com/questions/9915547/partial-match-search-takes-more-time-in-marklogic *Van:* general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] *Namens *Selvakumar Murugesan *Verzonden:* donderdag

Re: [MarkLogic Dev General] Fwd: [1.0-ml] XDMP-EXPNTREECACHEFULL

2012-03-26 Thread Geert Josten
Hi Vishnu, Your FLWOR expression won’t return distinct names, since you are applying the function to each individual name. You should write: distinct-values( for $a in //* return $a ) Or better: distinct-values(collection()//*/local-name()) But this still might not

Re: [MarkLogic Dev General] Fwd: [1.0-ml] XDMP-EXPNTREECACHEFULL

2012-03-26 Thread Geert Josten
(ContentAnalysis)//*/local-name()) -- Expanded tree cache full on host *the database overall size is only 90MB i don't think it is so huge data for marklogic Regards, Vishnu On Mon, Mar 26, 2012 at 1:25 PM, Geert Josten geert.jos...@dayon.nl wrote: Hi Vishnu, Your FLWOR expression won’t

Re: [MarkLogic Dev General] Fwd: [1.0-ml] XDMP-EXPNTREECACHEFULL

2012-03-26 Thread Geert Josten
Developer Discussion *Onderwerp:* Re: [MarkLogic Dev General] Fwd: [1.0-ml] XDMP-EXPNTREECACHEFULL Thanks Geert, Is there any alternate solution to find the unique elements within a database? Warm Regards, Vishnu On Mon, Mar 26, 2012 at 5:55 PM, Geert Josten geert.jos...@dayon.nl

Re: [MarkLogic Dev General] Fwd: [1.0-ml] XDMP-EXPNTREECACHEFULL

2012-03-26 Thread Geert Josten
) return $qn }; local:find-unique-qnames() On Mon, Mar 26, 2012 at 6:36 AM, Geert Josten geert.jos...@dayon.nl wrote: Hi Vishnu, It would help if you could explain why you need that list. But in general the best option would be to pre-calculate the list I guess. You can save it as a server

Re: [MarkLogic Dev General] Corona Questions

2012-03-23 Thread Geert Josten
be ok. You said something about the config of Corona. I have not touched that. Is that a place to look for issues? Randy On 3/22/2012 4:18 PM, Geert Josten wrote: Hi Randy, Are you sure corona is running against the correct documents database? Your rest call works just fine with me, returning

Re: [MarkLogic Dev General] Corona Questions

2012-03-23 Thread Geert Josten
On 3/23/2012 1:36 AM, Geert Josten wrote: Hi Randy, The reason I asked is because you aren’t getting back results. That sounds either that there really aren’t any docs containing the word ‘cat’ (less likely I thought), or you are running against an empty database. Did you double check? You

[MarkLogic Dev General] xdmp:quote doing indentation?

2012-03-23 Thread Geert Josten
Can I prevent xdmp:quote from adding whitespace? let $element := jsonfoobar//foo/json return xdmp:quote(remove_json_ns{ $element/* }/remove_json_ns/*) == foo bar/ /foo Kind regards, Geert M.Sc. G.P.H. (Geert) Josten Senior Developer Dayon B.V. Delftechpark 37b 2628 XJ Delft

Re: [MarkLogic Dev General] xdmp:quote doing indentation?

2012-03-23 Thread Geert Josten
RTFM: let $element := jsonfoobar//foo/json return xdmp:quote(remove_json_ns{ $element/* }/remove_json_ns/*, options xmlns=xdmp:quoteindentno/indent/options) Cheers.. -Oorspronkelijk bericht- Van: Geert Josten [mailto:geert.jos...@dayon.nl] Verzonden: vrijdag 23 maart 2012 17:38 Aan

Re: [MarkLogic Dev General] Problem in making use of cts:not-query()

2012-03-23 Thread Geert Josten
Good suggestion.. About “BTW, I tried the solution mentioned by Geert, to define the user as fragment root, but it did not work.”, it might be necessary to add /userdetails/user as searchable path. Queries do not cross fragment boundaries, so I guess the query was running against the fragment

Re: [MarkLogic Dev General] spell:suggest performance issue

2012-03-22 Thread Geert Josten
http://stackoverflow.com/questions/9813226/slow-first-query-after-update-to-spelling-dictionary/9817647#9817647 ;-) *Van:* general-boun...@developer.marklogic.com [mailto: general-boun...@developer.marklogic.com] *Namens *Amit Kumar113 *Verzonden:* donderdag 22 maart 2012 7:42 *Aan:*

Re: [MarkLogic Dev General] CMIS for MarkLogic?

2012-03-22 Thread Geert Josten
Hi Jakob, You can ask yourself whether it makes sense to support a CMS related protocol on a product that isn't really a CMS. Apart from that, it is basically just easier to put something like Alfresco on top of MarkLogic, and get both CMS and CMIS for 'free'.. Kind regards, Geert

Re: [MarkLogic Dev General] Corona Questions

2012-03-22 Thread Geert Josten
Hi Randy, A 404 likely means the endpoints config is wonky. Are you running latest copy from git? The 500 indicates something goes wrong internally. Can you tell what response you are getting exactly? In case of a 500, there should be more details in the response body. Kind regards, Geert

Re: [MarkLogic Dev General] Problem in making use of cts:not-query()

2012-03-22 Thread Geert Josten
Hi Subheer, Such queries in MarkLogic look at entire fragments, in this case the whole userdetails xml. Easiest way out is to define user as fragment root within the admin interface. But you might also consider chopping userdetails and storing each user as a separate document. Kind regards,

Re: [MarkLogic Dev General] Corona Questions

2012-03-22 Thread Geert Josten
the outputFormat=xml. So, that works if it thinks it is JSON. Hope this offers some clues! Thanks for the help! Randy On 3/22/2012 3:23 PM, Geert Josten wrote: Hi Randy, A 404 likely means the endpoints config is wonky. Are you running latest copy from git? The 500 indicates something goes wrong internally

Re: [MarkLogic Dev General] Determining stems for proper nouns?

2012-03-17 Thread Geert Josten
Or to extend on the idea of Mike, add two query terms, one case-sensitive, one case-insensitive, and give the later a lower weight.. Kind regards, Geert -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com [mailto:general- boun...@developer.marklogic.com] Namens Mike

Re: [MarkLogic Dev General] Using the semantic library to determine a relationship between two know terms

2012-03-16 Thread Geert Josten
Sounds like a kind of extended FOAF relation. Does the kind of relation matter? (e.g. what means 'knows') Kind regards, Geert -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com [mailto:general- boun...@developer.marklogic.com] Namens Michael Blakeley Verzonden:

Re: [MarkLogic Dev General] Using the semantic library to determine a relationship between two know terms

2012-03-16 Thread Geert Josten
predicate (relationship), but I think it would be valuable to find the intermediate nodes across multiple predicates, too. -Original Message- From: general-boun...@developer.marklogic.com [mailto:general- boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Friday, March 16, 2012

Re: [MarkLogic Dev General] Function to check task server queue?

2012-03-16 Thread Geert Josten
Hi Josh, You need xdmp:server-status(). I have some example code doing exactly the same. Look at the flush-task-server function of this library (should be the top one): https://github.com/grtjn/ml-queue/blob/master/queue-lib.xqy Kind regards, Geert *Van:*

Re: [MarkLogic Dev General] Advice on improving join on attribute performance

2012-03-16 Thread Geert Josten
Hi Nick, I guess David is referring to the xdmp:get-server-field() and xdmp:set-server-field() functions ( http://community.marklogic.com/pubs/5.0/apidocs/AppServerBuiltins.html#xdmp:get-server-field). Make sure to check whether it is initialized. You could also insert the map:map into the

Re: [MarkLogic Dev General] mixing buckets and computed-buckets in search:search?

2012-03-15 Thread Geert Josten
Hi Jakob, You could calculate the relatively anchored computed-bucket dynamically yourself, at each call I mean. That should be doable. But I agree mixing them would be easier. ;-) Kind regards, Geert -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] mixing buckets and computed-buckets in search:search?

2012-03-15 Thread Geert Josten
...@developer.marklogic.com [general- boun...@developer.marklogic.com] On Behalf Of Geert Josten [geert.jos...@dayon.nl] Sent: Thursday, March 15, 2012 3:18 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] mixing buckets and computed-buckets in     search:search

Re: [MarkLogic Dev General] Querying across 2 or more MarkLogic databases

2012-03-11 Thread Geert Josten
Hi Betty, Yes, you can use xdmp:invoke, or xdmp:eval for that purpose, but you'll have to combine results yourself in memory, so that comes with a penalty. Might be worth considering replication/syncing between databases.. Kind regards, Geert -Oorspronkelijk bericht- Van:

Re: [MarkLogic Dev General] Comparing Dates

2012-03-09 Thread Geert Josten
Comparing Dates Hi Johnathan, How about something like: let $asset_type_code := STY let $asset_creation_date := 20111017 let $asset_creation_date_start := xs:dateTime(fn:replace($asset_creation_date, ^(\d{4})(\d{2})(\d{2})$, $1-$2-$3T00:00:00)) let $asset_creation_date_end :=

Re: [MarkLogic Dev General] Field lexicon and frequency

2012-03-08 Thread Geert Josten
Hi Stéphane, It would be great to be able to use cts:frequency on words from field or word lexicons too. (Could anyone comment on why this is not possible?) But since that doesn't work (simply returns zero), you have either the option to: - tokenize the element values and store each token as a

Re: [MarkLogic Dev General] xdmp:collection-delete()

2012-03-07 Thread Geert Josten
Hi Palani, Sure only 50 docs had been added to that collection? You can test that easily using count(collection(“Test”)), or for a bit more speed xdmp:estimate(collection(“Test”)) Kind regards, Geert *Van:* general-boun...@developer.marklogic.com [mailto:general-bounces@deve

Re: [MarkLogic Dev General] A to Z buckets with search:search?

2012-03-07 Thread Geert Josten
Hi Jakob, Not entirely sure, but I'd expect it to be quite similar to date buckets: constraint name=title range type=xs:string element ns= name=title/ bucket name=A ge=A lt=BA/bucket (untested) Kind regards, Geert

Re: [MarkLogic Dev General] xdmp:collection-delete()

2012-03-07 Thread Geert Josten
, Geert Josten geert.jos...@dayon.nl wrote: Hi Palani, Sure only 50 docs had been added to that collection? You can test that easily using count(collection(“Test”)), or for a bit more speed xdmp:estimate(collection(“Test”)) Kind regards, Geert *Van:* general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] Marklogic query help

2012-02-29 Thread Geert Josten
Hi Abdul, Short answer: no. You could retrieve values from one doc, optionally using lexicons, and check them against a different doc, using lexicons or search. But you would have to make a list which values you would like to include in the compare, retrieve them all, pass them to a combined

Re: [MarkLogic Dev General] (1) Canceling XQuery requests, (2) Exploring Resource Hierarchy

2012-02-27 Thread Geert Josten
Hi Todd, It isn’t too difficult to write a rudimentary explore yourself. I’ve done one myself, which allows dir navigation. Mostly as a simple development tool, and not yet designed to work well with dirs with many files ( you have to have some paging to keep a bit of performance), but I could

Re: [MarkLogic Dev General] Processing Large Documents?

2012-02-26 Thread Geert Josten
Hi Todd, As far as I know MarkLogic only supports ZIP currently. One work-around would be to utilize Java functionality by setting up MLJAM next to MarkLogic and execute Java’s built-in functionality for various Zip formats. But I’d recommend doing that on insert, not on retrieve. On the other

Re: [MarkLogic Dev General] (1) Canceling XQuery requests, (2) Exploring Resource Hierarchy

2012-02-26 Thread Geert Josten
Hi Todd, (1)In the Query Console you should be able to simply truncate the transaction by pressing back or escape, and hit run for a new query. At least, that used to work in CQ, the older type of Query Console. (2)You can filter on collections in Explore by clicking on the

Re: [MarkLogic Dev General] Processing Large Documents?

2012-02-25 Thread Geert Josten
Hi Todd, I thought you said the blob contained hexBinary. In that case, just get it as string, cast it to xs:hexBinary, and pass that to binary {} constructor. That is not the case? What kind of values can your xsi:type attribute have? Can you give a small sample? Kind regards, Geert

Re: [MarkLogic Dev General] Passing Character Entities to Output

2012-02-25 Thread Geert Josten
Hi Betty, Your thread caught my attention earlier, but failed to look into in before. There are a few ways out I guess, but they might not be very elegant.. One option is to xdmp:quote the XML, and do a blunt replace of '#10;' with 'amp;#10;'. Upon serialization by the App Server, all line ends

Re: [MarkLogic Dev General] Processing Large Documents?

2012-02-25 Thread Geert Josten
When using xdmp:save(d:/tmp/text.xls, binary { $row/field[@name = 'file_blob'] }) I get the 2387 bytes mentioned in field ‘cmpr_size’. But that doesn’t open in excel. It doesn’t look like zip either. What kind of compression is applied? Kind regards, Geert *Van:*

Re: [MarkLogic Dev General] Processing Large Documents?

2012-02-24 Thread Geert Josten
To my knowledge putting hexbin inside binary { } is the way to create a real binary. So your approach should already work. Did you check? A small optimization could be to make batches of let’s say about a 100 records, build a map:map of them, pass that to a spawn process that inserts all 100.

Re: [MarkLogic Dev General] weird xpath behaviour

2012-02-23 Thread Geert Josten
Hi Szabolcs, Evan pointed out the following to me recently. / at the start of an XPath expression is interpreted within MarkLogic as ‘collection()/’. A / within a predicate, however, is not. It is effectively interpreted as ‘root()/ ‘. Kind regards, Geert *Van:*

Re: [MarkLogic Dev General] weird xpath behaviour

2012-02-23 Thread Geert Josten
… ) Cheers, Szabolcs *From:* general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] *On Behalf Of *Geert Josten *Sent:* 23 February 2012 14:21 *To:* MarkLogic Developer Discussion *Subject:* Re: [MarkLogic Dev General] weird xpath behaviour Hi Szabolcs

Re: [MarkLogic Dev General] weird xpath behaviour

2012-02-23 Thread Geert Josten
think, except inside a user-defined function). Evan Lenz Software Developer, Community MarkLogic Corporation community.marklogic.com *From: *Geert Josten geert.jos...@dayon.nl *Reply-To: *MarkLogic Developer Discussion general@developer.marklogic.com *Date: *Thu, 23 Feb 2012 06:55:06 -0800

Re: [MarkLogic Dev General] unable to install XQDebug

2012-02-21 Thread Geert Josten
Hi Nivas, Before MarkLogic 5, the Docs folder used to run under port 8000, with a small sandbox and some sample documents. These have been moved to elsewhere, and now the App-services run under port 8000. The quickest solution would be to move the xqdebug folder from under Docs/ to Apps/. From

Re: [MarkLogic Dev General] Alternative to using xincludes

2012-02-21 Thread Geert Josten
Alternative to using xincludes Hi Jon, The xinc library is written in XQuery, and as a matter of fact may or may not be a full implementation of the spec. The bottleneck is probably walking all contents to find xinclude references, and replace them with the referred doc, and perhaps walking

Re: [MarkLogic Dev General] Processing Large Documents?

2012-02-20 Thread Geert Josten
/field hierarchy. The container nodes in this case actually contain distingishing attributes which make them necessary to maintain. I would like to find a system that can handle deep hierarchies without penalizing performance. On Mon, Feb 20, 2012 at 12:12 AM, Geert Josten geert.jos...@dayon.nl

Re: [MarkLogic Dev General] Processing Large Documents?

2012-02-19 Thread Geert Josten
Hi Todd, It is mostly because of two reasons: memory footprint, and indexing. If you don’t have fragmentation enabled in the database configuration, then the entire document is one fragment of 150Gb. Any processing on fragments mean that the entire fragment is loaded into memory. Luckily

Re: [MarkLogic Dev General] Processing Large Documents?

2012-02-19 Thread Geert Josten
Hi Todd, I know a few tricks that could help getting this done with information studio. One of which is putting your XQuery in a custom XQuery transform. But you need to copy things like collection from the input file, and some other properties as well, to make sure resulting files are treated

Re: [MarkLogic Dev General] How to Stop Time Out

2012-02-15 Thread Geert Josten
Yes, and spawning also mean it will run on the task server, which usually has a much larger timeout time specified.. Good luck! Geert -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com [mailto:general- boun...@developer.marklogic.com] Namens Danny Sokolsky

Re: [MarkLogic Dev General] xdmp:document-get vs xdmp:extermal-binary

2012-02-15 Thread Geert Josten
Document-get has a file size limitation too. I forgot were it is in the docs, but Mike mentioned it recently. 16Mb with 32-bit, 64Mb with 64-bit. Filesystem-file doesn't have this limitation, and I suspect the external-binary function neither.. Grtz -Oorspronkelijk bericht- Van:

Re: [MarkLogic Dev General] How to Stop Time Out

2012-02-14 Thread Geert Josten
Hi Betty, You say 'the script stops at 36'. That sounds to me as if you are creating all 186 spreadsheets in one request. Is it possible to generate them one by one? That might also allow parallel processing them. You also say that a larger case deals with a spreadsheet of 664k+ rows and takes

Re: [MarkLogic Dev General] Stack button on Task Server Status screen of Admin

2012-02-13 Thread Geert Josten
, it will retry right away rather than doing a bunch of work, seeing there is a lock, and then retrying. -Danny From: general-boun...@developer.marklogic.com [general- boun...@developer.marklogic.com] On Behalf Of Geert Josten [geert.jos...@dayon.nl

Re: [MarkLogic Dev General] Cts query for element attribute value matching another attribute value?

2012-02-13 Thread Geert Josten
: //elem[@attr1][@attr2][@att1 = @att2] -- Mike On 12 Feb 2012, at 01:16 , Geert Josten wrote: I am trying to isolate some specific element with two attributes who's values are equal. I know I can use an expression like doc()//elem[@att1 = @att2], which is even fully searchable according

Re: [MarkLogic Dev General] Transactions - is eval the best solution?

2012-02-13 Thread Geert Josten
Hi Ankur, You could use xdmp:invoke to call main modules, and use the MarkLogic-specific feature to allow multiple statements into one main module file, separated by a semi-colon. If you are using libraries, make sure to add imports for them after each semi-colon, though. Works with xdmp:eval as

[MarkLogic Dev General] Cts query for element attribute value matching another attribute value?

2012-02-12 Thread Geert Josten
unique values, and I am trying to prevent using distinct-values on the above XPath expression.. Any suggestions? Kind regards, Geert drs. G.P.H. (Geert) Josten Senior Developer Dayon B.V. Delftechpark 37b 2628 XJ Delft T +31 (0)88 26 82 570 geert.jos...@dayon.nl www.dayon.nl De informatie

[MarkLogic Dev General] Stack button on Task Server Status screen of Admin

2012-02-11 Thread Geert Josten
If you go to a Task Server Status screen, and hit the Show More button, it shows a list of all currently running threads. Behind there is a [cancel] button, but also a [stack] button. What is it supposed to do? Kind regards, Geert drs. G.P.H. (Geert) Josten Senior Developer Dayon B.V

Re: [MarkLogic Dev General] Stack button on Task Server Status screen of Admin

2012-02-11 Thread Geert Josten
. -- Mike On 11 Feb 2012, at 01:36 , Geert Josten wrote: If you go to a Task Server Status screen, and hit the Show More button, it shows a list of all currently running threads. Behind there is a [cancel] button, but also a [stack] button. What is it supposed to do? Kind regards, Geert

Re: [MarkLogic Dev General] Stack button on Task Server Status screen of Admin

2012-02-11 Thread Geert Josten
, but aren't sure why your code would create deadlocks, you might also find it useful to add xdmp:log messages before each update call. An xdmp:query-trace(true()) at the top of your code might help too. -- Mike On 11 Feb 2012, at 09:52 , Geert Josten wrote: Ah, that also explains why I wasn't

Re: [MarkLogic Dev General] BOM char and UTF-16

2012-02-08 Thread Geert Josten
Hi Josh, Your first line doesn’t show where the BOM is located. It should be the first two characters of the first line. Note: the encoding attribute in the XML pi, doesn’t ensure it really is written in that encoding, though is a strong suggestion usually. Particularly if the file is written

Re: [MarkLogic Dev General] Optimiziing for several writes

2012-02-06 Thread Geert Josten
Hi Ryan, It might be worth to turn off automatic directory creation as well. The more slashes in your URIs, the bigger the impact. Need to analyze the URIs? Use the URI lexicon instead.. Kind regards, Geert -Oorspronkelijk bericht- Van: general-boun...@developer.marklogic.com

Re: [MarkLogic Dev General] element search question

2012-02-06 Thread Geert Josten
Hi John, From what I understood from it: XPath uses indexes whenever possible, but depends a lot on how well the query optimizer is able to translate your XPath to indexes. Slightly different expressions can give big performance differences. You can investigate that with amongst others

Re: [MarkLogic Dev General] element-query with punctuation insensitive and punctuation marks as cts:text

2012-02-01 Thread Geert Josten
Hi Abishek, What is happening here is that you pass ‘,’ as search term to a word-query with ‘punctuation-insensitive’ option. That option causes the comma character effectively to be stripped out of the search term, leaving an empty search term. Doing a cts:word-query with an empty search term

Re: [MarkLogic Dev General] New server not finding namespace

2012-02-01 Thread Geert Josten
Hi Dean, I kinda suspected that the local prefix wasn’t the problem, but that is hard to pinpoint without complete code. I have to admit that the error message is not helping, that would have probably saved you a lot of time. The reason why this goes wrong is because when you try to create

Re: [MarkLogic Dev General] Replace acting weird?

2012-01-30 Thread Geert Josten
I guess it makes sense somehow, adding extra braces around the (...)+ part solved my problem.. Cheers, Geert -Oorspronkelijk bericht- Van: Geert Josten [mailto:geert.jos...@dayon.nl] Verzonden: maandag 30 januari 2012 7:45 Aan: General MarkLogic Developer Discussion Onderwerp: RE

[MarkLogic Dev General] Replace acting weird?

2012-01-29 Thread Geert Josten
^([^\\]+|\\[\\nrt]|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8})+(.*) /pattern return replace($text, $pattern, '$1') Grtz drs. G.P.H. (Geert) Josten Senior Developer Dayon B.V. Delftechpark 37b 2628 XJ Delft T +31 (0)88 26 82 570 geert.jos...@dayon.nl www.dayon.nl De informatie - verzonden in of met dit e

Re: [MarkLogic Dev General] en/em dashes punctuation?

2012-01-29 Thread Geert Josten
A lot has been said already in this thread, but what strikes me is why the string is tokenized in the first place. Why not just sent through as a single phrase to a single cts:word-query? Then it would just be ignored, without negative side-effects.. Grtz -Oorspronkelijk bericht- Van:

<    3   4   5   6   7   8   9   10   11   12   >