Re: [MarkLogic Dev General] Performance Tuning - cts:search/cts:or Query

2010-05-17 Thread Andrew Welch
"chapter"), > xs:QName("name"), "chap4")) That's ultimately the same as: //chapt...@name = ('chap1', 'chap2', 'chap3', 'chap4', 'chap5', 'chap6', 'chap9', 'newChap')] ...which is a b

Re: [MarkLogic Dev General] additional-query when element is missing

2010-05-03 Thread Andrew Welch
> no expirationDate in the document? The usual idiom for "if nnn exists then nnn else default" is "(nnn, default)[1]", so you could use: (//expirationDate, current-date())[1] ge current-date() If the expirationDate exists, it will be first in the sequence and get selected,

Re: [MarkLogic Dev General] digest vs digestbasic

2010-03-25 Thread Andrew Welch
igestbasic, XCC uri with default password succeeded. > > Difference between the two? > > > > ___ > General mailing list > General@developer.marklogic.com > http://xqzone.com/mailman/listinfo/general > > -

Re: [MarkLogic Dev General] Create trigger from XQuery, not see it in the console

2010-03-22 Thread Andrew Welch
:= 'your trigger creation code' return (xdmp:eval($query, (), {xdmp:database('the-triggers-db')} ^^^^ ), 'Done') -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___

Re: [MarkLogic Dev General] Create trigger from XQuery, not see it in the console

2010-03-22 Thread Andrew Welch
ion query into a variable, and then use xdmp:eval which allows you to specific the database to execute it against as part of the the query: let $query := 'your trigger creation code' return (xdmp:eval($query, (), {xdmp:database('the-triggers-db')} ), 'Done') -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

Re: [MarkLogic Dev General] How to handle custom namedentitiesinzipped xml?

2010-03-19 Thread Andrew Welch
nt, leaving your XML dtd free. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

[MarkLogic Dev General] smtp relay on amazon ec2

2010-03-15 Thread Andrew Welch
Hi, Does anyone know if its possible to send email alerts from an instance running on Amazon EC2? What should the SMTP Relay be set to? thanks -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list

Re: [MarkLogic Dev General] Escaping text?

2010-03-03 Thread Andrew Welch
:= 'http://www.w3.org/1998/Math/MathML":semantics}'' is expected."/>' return xdmp:unquote($ex) The entity reference " needs to be double escaped to " so that once the query has been parsed by the query processor, the & entity

Re: [MarkLogic Dev General] Escaping text?

2010-03-03 Thread Andrew Welch
On 3 March 2010 18:31, Wyatt VanderStucken wrote: > I've been banging my head trying to figure this out - any ideas would be > much appreciated > > let $ex as xs:string := 'http://www.w3.org/1998/Math/MathML":semantics}'' is > expected."/>' > return xdmp:unquote($ex) > > Always gives error "Sy

Re: [MarkLogic Dev General] user installation using a query

2010-03-02 Thread Andrew Welch
provide and example of how would the user run it using xmlsh? Fwiw, curl doesn't need installing, it would just need to be on the disc, so the user could just run "install.bat" and that would be it (providing the query it curls to eval2.xqy r

Re: [MarkLogic Dev General] user installation using a query

2010-03-02 Thread Andrew Welch
On 2 March 2010 17:53, G. Ken Holman wrote: > At 2010-03-02 16:41 +0000, Andrew Welch wrote: >> >> Hi, >> >> It seems that everything you can do through the admin screen you can >> do through a query... so rather give the customer a list of steps to >> fo

Re: [MarkLogic Dev General] user installation using a query

2010-03-02 Thread Andrew Welch
ave-configuration($config); > > > > (: application server :) > > xquery version "1.0-ml"; > > import module namespace admin = "http://marklogic.com/xdmp/admin"; at > "/MarkLogic/admin.xqy"; > > let $config := admin:get-configuration() > &

[MarkLogic Dev General] user installation using a query

2010-03-02 Thread Andrew Welch
nstall.xqy ...or is there another way? thanks -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

[MarkLogic Dev General] filtering using a common value stored two different ways

2010-02-24 Thread Andrew Welch
Hi, It's difficult to come up with the subject line that reflects what I mean, but hopefully this makes sense. We have a mix of XML in a standard structure, along with user added content (pdfs, word, html etc) that goes through the CPF. The standard XML contains a element, and we also allow the

[MarkLogic Dev General] extract terms and constraints from the query text

2010-02-23 Thread Andrew Welch
I can add true to option to get back the query xml and then extract them "manually" from there, but I'm wondering if there's a function that will do it for me? The function search:remove-constraint() allows me to remove them individually, I just need to get them as indivi

[MarkLogic Dev General] search api search:match contains whole document when facets are used

2010-02-23 Thread Andrew Welch
e rest of the text in the document up to max-snippet-chars) So whenever the query includes a facet, I no longer get any search:highlight elements in the search:response - is that expected or am I doing something wrong? thanks -- Andrew Welch http://andrewjwelch.com Kernow: htt

Re: [MarkLogic Dev General] Distinct Nodes/Value Functions

2010-02-19 Thread Andrew Welch
inear isn't it? :) cheers -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

Re: [MarkLogic Dev General] on-modify trigger that modifies the xml

2010-02-16 Thread Andrew Welch
ough the CPF (word and pdf etc)... as I think for each node-replace the CPF update triggers are also being called -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

Re: [MarkLogic Dev General] on-modify trigger that modifies the xml

2010-02-16 Thread Andrew Welch
even going about this the right way...? It's not possible to supply an options node to entity:enrich to configure what gets marked up, so I've added this step to fix it retrospectively. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ _

[MarkLogic Dev General] on-modify trigger that modifies the xml

2010-02-16 Thread Andrew Welch
create, the trigger is executed just the once, but then if a newer file is inserted over the old one, it doesn't fire. What is the correct approach when you need some query to run on document modify, but that query modifies the document? thanks -- Andrew Welch http://andrewjwelch.com Kernow:

Re: [MarkLogic Dev General] how to integrate java in xquery

2010-02-11 Thread Andrew Welch
ble using a rest-style xml-over-http set of uris, and then call it using the doc() function. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailm

[MarkLogic Dev General] search api search:response and the CPF

2010-02-11 Thread Andrew Welch
ected: ".html", "_html.xhtml" and "_html.xml" so I suspect it's a possible bug in the search:response xml ? I'm using 4.1-2 -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General

Re: [MarkLogic Dev General] Facing issue with facet- range contrain

2010-02-10 Thread Andrew Welch
ences to the documents: http://marklogic.com/appservices/search";> . I'm not sure what you mean by "the whole document is listed in the search response"... It sounds like you are after the search:match/@path.

Re: [MarkLogic Dev General] library search

2010-02-10 Thread Andrew Welch
; >     > return >  search:search("subject:math",$options) > _______ > General mailing list > General@developer.marklogic.com > http://xqzone.com/mailman/listinfo/general > -- Andrew Welch http://andrewjwelch.com Kernow:

Re: [MarkLogic Dev General] Sorting the search results depending on the elements if available

2010-01-28 Thread Andrew Welch
> > > Thanks > Anu > > _______ > General mailing list > General@developer.marklogic.com > http://xqzone.com/mailman/listinfo/general > > -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

Re: [MarkLogic Dev General] pdf conversion and inheriting collections from the parent directory

2010-01-26 Thread Andrew Welch
gt; Yes that looks like the plan. The way that the original pdf inherits the collection, but not the xml generated alongside it seems like a bug? -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list G

Re: [MarkLogic Dev General] pdf conversion and inheriting collections from the parent directory

2010-01-25 Thread Andrew Welch
/") > xdmp:document-get-collections("/content/user/pdf/") returns content/pdf content content/user/pdf and remember the pdf that gets dropped into the directory picks up the collections no problem, its only the files that get generated alongside the original that don't have

[MarkLogic Dev General] pdf conversion and inheriting collections from the parent directory

2010-01-25 Thread Andrew Welch
re being ignored. Is it right it to expect the generated files to also inherit the collections? Or do I need to do something else to ensure those files, or at least the xml file belongs to that collection? thanks andrew -- Andrew Welch http://andrewjwelch.com Kernow

Re: [MarkLogic Dev General] Configuring entity enrichment

2010-01-25 Thread Andrew Welch
atever task you are doing needs to run after the CPF has finished then I guess its a reasonable approach to use a post-commit on-modify trigger. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list G

Re: [MarkLogic Dev General] Configuring entity enrichment

2010-01-25 Thread Andrew Welch
problem is.  If it is only > happening on a few documents, then a relatively manual approach might work.   > If it is widespread, then you will probably want a general solution. > > Maybe that will give you a few ideas. > > -Danny > > -Original Message- > From: gener

Re: [MarkLogic Dev General] Configuring entity enrichment

2010-01-25 Thread Andrew Welch
Ok, here's the current issue: - I'm using the entity enrichment pipeline as part of the CPF - I would like to use a range index on e:date - Currently words like "Monday" are being marked up with e:date - When attempting to load any doc that contains a non-xs:date for an e:date, I get the exception

Re: [MarkLogic Dev General] sort and group the records based on number sorting.

2010-01-22 Thread Andrew Welch
a.b.c > > > > 0.0.b.b > > > 0.0.b.c > > > > > > any solution  for this. > > Thank you in advance one and all. > ___ > General mailing list > General@developer.marklogic.com > http://xqzone.com/mailman/listinfo/general > -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

Re: [MarkLogic Dev General] Configuring entity enrichment

2010-01-22 Thread Andrew Welch
     it might be not a valid social > security number. > > Does that help? > > -Danny > > -Original Message- > From: general-boun...@developer.marklogic.com > [mailto:general-boun...@developer.marklogic.com] On Behalf Of Andrew Welch > Sent: Thursday, January 21, 2010 7:11

[MarkLogic Dev General] Configuring entity enrichment

2010-01-21 Thread Andrew Welch
processes the entity markup to be what I need, or should I configure the process somehow to not mark it up in the first place? thanks -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list Genera

Re: [MarkLogic Dev General] question about cts:search

2010-01-21 Thread Andrew Welch
> for $i in doc()/ns1:article//ns1:sub[not(@temp1 or @temp2)] > return > base-uri($i) > > it returns 7 uris and they are actually the same uri  (/pt/ajr_1.xml), just > because there are 7 ns1:sub nodes found. > > -- > > when I tried to run > doc()/ns1:article//ns1:sub[not(@temp1 or

Re: [MarkLogic Dev General] question about cts:search

2010-01-20 Thread Andrew Welch
e//ns1:sub[fn:not(@temp1 or @temp2 )]/fn:document-uri(.) > then I got empty sequence, change it to pass the root node to the document-uri function: fn:document-uri(fn:root(.)) cheers -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ _

Re: [MarkLogic Dev General] question about cts:search

2010-01-20 Thread Andrew Welch
t took long time, I don't want to run it on production database. And > using cts:query, I don't know how to check if an element has an attribute or > not. > > Does anyone have any suggestions for this? how about: //ns1:sub[not(@temp1)][not(@temp2)]/fn:docume

[MarkLogic Dev General] XDMP-COLLATION: (err:FOCH0002) Unsupported collation

2010-01-08 Thread Andrew Welch
Hi, When upgrading from 4.0-5 to 4.1-4 we get the following error: Initialization: XDMP-COLLATION: (err:FOCH0002) Unsupported collation: Collation hash 0xf932fc4dad2ab45 not recognized There are several existing projects, but all only use the "http://marklogic.com/collation/"; "Root Collation".

Re: [MarkLogic Dev General] Faceted Navigation on MarkLogic 4.1-4

2010-01-07 Thread Andrew Welch
__ > General mailing list > General@developer.marklogic.com > http://xqzone.com/mailman/listinfo/general > > -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mai

Re: [MarkLogic Dev General] cts:highlight using the query from theqtext area of the search:response

2009-12-22 Thread Andrew Welch
response output).  They include the > highlighted terms. > > -Danny > > -Original Message- > From: general-boun...@developer.marklogic.com > [mailto:general-boun...@developer.marklogic.com] On Behalf Of Andrew Welch > Sent: Monday, December 21, 2009 3:40 AM

Re: [MarkLogic Dev General] cts:highlight using the query from theqtext area of the search:response

2009-12-21 Thread Andrew Welch
e verwijderen. Aan dit > bericht kunnen geen rechten worden ontleend. > > > > ___ > General mailing list > General@developer.marklogic.com > http://xqzone.com/mailman/listinfo/general > -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

[MarkLogic Dev General] cts:highlight using the query from the qtext area of the search:response

2009-12-21 Thread Andrew Welch
Given a query like "hello AND foo:bar" how I can use cts:highlight to highlight the results in the document itself? I use the search api (search:search) to run the initial search, and would like to highlight the page after the user has clicked through from one of the results (passing the the uri a

Re: [MarkLogic Dev General] Set or add directory collections on an existing directory

2009-12-14 Thread Andrew Welch
ons > > --Colleen > > From: general-boun...@developer.marklogic.com > [general-boun...@developer.marklogic.com] On Behalf Of Andrew Welch > [andrew.j.we...@gmail.com] > Sent: Monday, December 14, 2009 3:49 AM > To: General Mark Logic Developer Discussion > Subject:

[MarkLogic Dev General] Set or add directory collections on an existing directory

2009-12-14 Thread Andrew Welch
Hi, Is it possible to set a collection on an existing directory, or is it only possible to set the collections at directory creation time (using xdmp:directory-create) ? thanks andrew -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net

Re: [MarkLogic Dev General] RE: Help with co-occurrence (?) xquery

2009-12-14 Thread Andrew Welch
7;m trying this nieve xquery ... which hasnt completed yet: >> >> let $d1 := 387494007, >>    $d2 := 387458008 >> >> for $c in xdmp:directory("/SNOMED/concepts/")//CONCEPT >> let $cid := $c/CONCEPTID/string() >> return >>   xdmp:directory("/SNOMED/relationships/&

Re: [MarkLogic Dev General] RE: Help with co-occurrence (?) xquery

2009-12-13 Thread Andrew Welch
he suggestions solved the basic problem that I cant find > another approach > to do a query which doesnt require a loop over all values of   > there is no (to my finding) >   cts:search( //item , >       magic search that returns matches where a is the same and b > matches both $val

Re: [MarkLogic Dev General] Help with co-occurance (?) xquery

2009-12-12 Thread Andrew Welch
ely? If so then you want either: not(CONCEPTID2 != ($d1, $d2)) or CONCEPTID2[1] = ($d1, $d2) and CONCEPTID2[2] = ($d1, $d2) however neither of those ensures that both CONCEPTID2 elements are different, so you may need to add an additional check for that. -- Andrew Welch http://andr

Re: [MarkLogic Dev General] Matching ampersand in 4.1

2009-12-04 Thread Andrew Welch
node. Great! But under 4.1 I just get the > empty sequence (replacing & with & gives no effect). So could anyone > please suggest another idea of matching ampersand-containing strings in 4.1 > environment? Are you sure the problem is the ampersand? What happens if you sanity chec

Re: [MarkLogic Dev General] Novice question: How to access named attributes of an element

2009-11-24 Thread Andrew Welch
sult. To get the value of the attribute you need to use the fn:string() function, using: fn:string(meta/@content) or meta/@content/fn:string(.) -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

Re: [MarkLogic Dev General] XML structure/schema design for MLS

2009-11-24 Thread Andrew Welch
esults would be the same) because indexes can be used. I've also heard that using a flowr expression instead of single xpath can help because it simplifies the expression which helps the processor spot what it can optimise. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowfor

Re: [MarkLogic Dev General] search for non-existing elements

2009-11-19 Thread Andrew Welch
f where fn:empty($c/definingConcepts/concept) return $c -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general

Re: [MarkLogic Dev General] search for multiple terms in ML

2009-11-17 Thread Andrew Welch
PI to enable the search for multiple terms? Give an example of what you mean... do you mean something like "foo OR bar", or "type:foo class:bar" etc.. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/

Re: [MarkLogic Dev General] Character "Paragraph Separator"

2009-11-17 Thread Andrew Welch
lev4)} > ) > Result (text): > ... > /ReBIC/FBU/11/23/FBU_11_23_0823_Index.xml > /ReBIC/FBU/11/23/FBU_11_23_0823_solarfun-kader-1- > De-erven-Brenninkmeijer > -.xml > /ReBIC/FBU/11/23/FBU_11_23_0823_TECH25_INTRO.xml > ... > > > How can I solve this problem? h

Re: [MarkLogic Dev General] Function to map an Xpath to a term

2009-11-17 Thread Andrew Welch
ap an XPath to a term and use that term in search > functions instead of xpath. > > > > Thanks > > Pradeep Maddireddy > > ___ > General mailing list > General@developer.marklogic.com > http://xqzone.com/mailman/listinfo/g

Re: [MarkLogic Dev General] Analize text for matches.

2009-11-16 Thread Andrew Welch
   “Take two aspirin or codeine and call me in the morning” > > > > I would like to search this entire string and find matches where any word in > the string is an exact match to some criteria. Again, using the search api, you just pass that string

Re: [MarkLogic Dev General] Renaming Documents - question on example

2009-11-09 Thread Andrew Welch
u rely on a particular evaluation order, regarding > their side effects ;-) As far as I know, items in a sequence are are evaluated in that order... It would be good to have that confirmed though. -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ _

[MarkLogic Dev General] standard search:response formatting

2009-11-04 Thread Andrew Welch
Hi, Is there an existing function that takes a search:response and generates some nicely formatted xhtml I can borrow from? thanks -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General

Re: [MarkLogic Dev General] Generate CSV Output

2009-10-26 Thread Andrew Welch
i/id, $fi/addr, $fi/city, $fi/state, $de/test, $de/test1), '|') -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ ___ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general