Re: [MarkLogic Dev General] Noob help with setting db options

2013-02-15 Thread Geert Josten
Hi Dan,



You can post the configuration XML to
http://localhost:8002/manage/v1/package/install/



There is documentation available on docs.marklogic.com:
http://docs.marklogic.com/REST/packaging



Kind regards,

Geert



*Van:* general-boun...@developer.marklogic.com [mailto:
general-boun...@developer.marklogic.com] *Namens *Gibbons, Daniel (RBI-UK)
*Verzonden:* vrijdag 15 februari 2013 15:26
*Aan:* MarkLogic Developer Discussion
*Onderwerp:* Re: [MarkLogic Dev General] Noob help with setting db options



OK great thanks for the info.



So if I export a configuration is there an API to import it somewhere?



Thanks



Dan





*From:* general-boun...@developer.marklogic.com [
mailto:general-boun...@developer.marklogic.com]
*On Behalf Of *Geert Josten
*Sent:* 15 February 2013 12:34
*To:* MarkLogic Developer Discussion
*Subject:* Re: [MarkLogic Dev General] Noob help with setting db options



Hi Dan,



It might be worth looking into the Configuration Manager that is running at
http://localhost:8002/nav/. It allows you to export and import
configurations to and from XML, and you can also post exported
configurations with an http call from java. It should be possible to use
this complementary to what you are already using, but it might even replace
it all together.



There are also quite a number of other solutions that help with deployment.
You can find a number of them on the DMC:
http://developer.marklogic.com/code



Kind regards,

Geert



*Van:* general-boun...@developer.marklogic.com [mailto:
general-boun...@developer.marklogic.com] *Namens *Gibbons, Daniel (RBI-UK)
*Verzonden:* vrijdag 15 februari 2013 11:03
*Aan:* general@developer.marklogic.com
*Onderwerp:* [MarkLogic Dev General] Noob help with setting db options



Hello,



I’m just starting to learn MarkLogic and my interest is from an automation
perspective so I just need to do something basic at the moment.



Based on some existing scripts that someone else wrote I can auto
create/attach a db and forest which is great, what I need to do next is
simply set some database settings such as “fast element word searches”,
“three character searches” etc.



We have a custom console application that parses a folder of query delta
scripts and sequentially executes each one if it hasn’t been run already.
 It’s calling:

Request 

*request* = session.NewAdhocQuery
(xqueryToExcecute);



My question is what would be the best way for me to script setting of the
db settings?  If I go with the delta queries I found database-set-feature
but it requires specifying the database which would normally be fine but
I’d like to somehow parse that in rather than hardcoding.  I’ve also been
looking at packages but not sure if I could package up the required
settings or how to automate that bit.  Or maybe there’s another way?



Any suggestions would be great!



Thanks



Dan



= DISCLAIMER ==
This message is intended only for the use of the person(s)
("Intended Recipient") to whom it is addressed. It may contain
information which is privileged and confidential. Accordingly
any dissemination, distribution, copying or other use of this
message or any of its content by any person other than the Intended
Recipient may constitute a breach of civil or criminal law and is
strictly prohibited. If you are not the Intended Recipient, please
contact the sender as soon as possible.

Reed Business Information Limited.
Registered Office: Quadrant House, The Quadrant, Sutton, Surrey, SM2 5AS,
UK.
Registered in England under Company No. 151537

===
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Noob help with setting db options

2013-02-15 Thread Gibbons, Daniel (RBI-UK)
OK great thanks for the info.

So if I export a configuration is there an API to import it somewhere?

Thanks

Dan


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten
Sent: 15 February 2013 12:34
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Noob help with setting db options

Hi Dan,

It might be worth looking into the Configuration Manager that is running at 
http://localhost:8002/nav/. It allows you to export and import configurations 
to and from XML, and you can also post exported configurations with an http 
call from java. It should be possible to use this complementary to what you are 
already using, but it might even replace it all together.

There are also quite a number of other solutions that help with deployment. You 
can find a number of them on the DMC: http://developer.marklogic.com/code

Kind regards,
Geert

Van: 
general-boun...@developer.marklogic.com
 
[mailto:general-boun...@developer.marklogic.com]
 Namens Gibbons, Daniel (RBI-UK)
Verzonden: vrijdag 15 februari 2013 11:03
Aan: general@developer.marklogic.com
Onderwerp: [MarkLogic Dev General] Noob help with setting db options

Hello,

I'm just starting to learn MarkLogic and my interest is from an automation 
perspective so I just need to do something basic at the moment.

Based on some existing scripts that someone else wrote I can auto create/attach 
a db and forest which is great, what I need to do next is simply set some 
database settings such as "fast element word searches", "three character 
searches" etc.

We have a custom console application that parses a folder of query delta 
scripts and sequentially executes each one if it hasn't been run already.   
It's calling:

Request
 request = 
session.NewAdhocQuery(xqueryToExcecute);

My question is what would be the best way for me to script setting of the db 
settings?  If I go with the delta queries I found database-set-feature but it 
requires specifying the database which would normally be fine but I'd like to 
somehow parse that in rather than hardcoding.  I've also been looking at 
packages but not sure if I could package up the required settings or how to 
automate that bit.  Or maybe there's another way?

Any suggestions would be great!

Thanks

Dan


= DISCLAIMER ==
This message is intended only for the use of the person(s)
("Intended Recipient") to whom it is addressed. It may contain
information which is privileged and confidential. Accordingly
any dissemination, distribution, copying or other use of this
message or any of its content by any person other than the Intended
Recipient may constitute a breach of civil or criminal law and is
strictly prohibited. If you are not the Intended Recipient, please
contact the sender as soon as possible.

Reed Business Information Limited.
Registered Office: Quadrant House, The Quadrant, Sutton, Surrey, SM2 5AS, UK.
Registered in England under Company No. 151537

===
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Noob help with setting db options

2013-02-15 Thread Geert Josten
Hi Dan,



It might be worth looking into the Configuration Manager that is running at
http://localhost:8002/nav/. It allows you to export and import
configurations to and from XML, and you can also post exported
configurations with an http call from java. It should be possible to use
this complementary to what you are already using, but it might even replace
it all together.



There are also quite a number of other solutions that help with deployment.
You can find a number of them on the DMC:
http://developer.marklogic.com/code



Kind regards,

Geert



*Van:* general-boun...@developer.marklogic.com [mailto:
general-boun...@developer.marklogic.com] *Namens *Gibbons, Daniel (RBI-UK)
*Verzonden:* vrijdag 15 februari 2013 11:03
*Aan:* general@developer.marklogic.com
*Onderwerp:* [MarkLogic Dev General] Noob help with setting db options



Hello,



I’m just starting to learn MarkLogic and my interest is from an automation
perspective so I just need to do something basic at the moment.



Based on some existing scripts that someone else wrote I can auto
create/attach a db and forest which is great, what I need to do next is
simply set some database settings such as “fast element word searches”,
“three character searches” etc.



We have a custom console application that parses a folder of query delta
scripts and sequentially executes each one if it hasn’t been run already.
 It’s calling:

Request 

*request* = session.NewAdhocQuery
(xqueryToExcecute);



My question is what would be the best way for me to script setting of the
db settings?  If I go with the delta queries I found database-set-feature
but it requires specifying the database which would normally be fine but
I’d like to somehow parse that in rather than hardcoding.  I’ve also been
looking at packages but not sure if I could package up the required
settings or how to automate that bit.  Or maybe there’s another way?



Any suggestions would be great!



Thanks



Dan



= DISCLAIMER ==
This message is intended only for the use of the person(s)
("Intended Recipient") to whom it is addressed. It may contain
information which is privileged and confidential. Accordingly
any dissemination, distribution, copying or other use of this
message or any of its content by any person other than the Intended
Recipient may constitute a breach of civil or criminal law and is
strictly prohibited. If you are not the Intended Recipient, please
contact the sender as soon as possible.

Reed Business Information Limited.
Registered Office: Quadrant House, The Quadrant, Sutton, Surrey, SM2 5AS,
UK.
Registered in England under Company No. 151537

===
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Noob help with setting db options

2013-02-15 Thread Gibbons, Daniel (RBI-UK)
Hello,

I'm just starting to learn MarkLogic and my interest is from an automation 
perspective so I just need to do something basic at the moment.

Based on some existing scripts that someone else wrote I can auto create/attach 
a db and forest which is great, what I need to do next is simply set some 
database settings such as "fast element word searches", "three character 
searches" etc.

We have a custom console application that parses a folder of query delta 
scripts and sequentially executes each one if it hasn't been run already.   
It's calling:

Request
 request = 
session.NewAdhocQuery(xqueryToExcecute);

My question is what would be the best way for me to script setting of the db 
settings?  If I go with the delta queries I found database-set-feature but it 
requires specifying the database which would normally be fine but I'd like to 
somehow parse that in rather than hardcoding.  I've also been looking at 
packages but not sure if I could package up the required settings or how to 
automate that bit.  Or maybe there's another way?

Any suggestions would be great!

Thanks

Dan


= DISCLAIMER ==
This message is intended only for the use of the person(s) 
("Intended Recipient") to whom it is addressed. It may contain 
information which is privileged and confidential. Accordingly 
any dissemination, distribution, copying or other use of this 
message or any of its content by any person other than the Intended 
Recipient may constitute a breach of civil or criminal law and is 
strictly prohibited. If you are not the Intended Recipient, please 
contact the sender as soon as possible.

Reed Business Information Limited.
Registered Office: Quadrant House, The Quadrant, Sutton, Surrey, SM2 5AS, UK.
Registered in England under Company No. 151537

===
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Triggers Handling : Directory scope constraint and collection

2013-02-15 Thread Stephane Toussaint
Damon,

Actually I understand  your explanation, but in a sense it seem's to be a 
technical assumption more than a functional concept.

I can explain my use case :

- I have 2 Content type A and B (in two different directories)
- A trigger on directory A so that when a content of type A is created or 
modified I wan't to detect if Content of type B match the content A (join both 
content base on one or two key elements)
- The content A is then flagged eligible to be send to a back-office.

My concern now is that if some part of another process needs to add a content A 
in a collection for whatever needs to be done (categorization, collection 
basket, ...), I don't wan't the trigger to be triggered to not overflowed the 
back office with non modified content.

Your proposition is that the client :
- Insert new/updates content (without trigger handling).
- Invoke the module to treat the detection as a post action.

I guess I can do it this way, but it's a pity that I can't rely on Marklogic's 
Triggers in order to do something it seems to be designed to.

The real question I can't find answer to is why Marklogic treat collections and 
properties in different manner from content-source triggers point of view. 
Reading your explanation, I'll say that properties should then work the same 
way.

Thank you for your comment,
Stéphane



Le 8 févr. 2013 à 15:54, Damon Feldman  a écrit :

> Stéphane,
> 
> Adding a collection to a document is actually a change to the document. The 
> "collection" works very much like an invisible element added to the document 
> - the collection does not exist as a separate entity outside these tags added 
> to the documents.
> 
> Can you tell us what you are trying to accomplish? When possible, I prefer 
> not to use triggers and instead build sensible data services that allow full 
> control of the updates. In that case, your update-content.xqy module would 
> invoke the functionality you want, but your add-to-collection.xqy module 
> would not, without using triggers in either case.
> 
> Yours,
> Damon
> 
> --
> Damon Feldman
> Sr. Principal Consultant, MarkLogic
> 
> -Original Message-
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Stephane 
> Toussaint
> Sent: Friday, February 08, 2013 9:12 AM
> To: MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] Triggers Handling : Directory scope 
> constraint and collection
> 
> Hi,
> 
> With a trigger defined as in the current Api Documentation 
> (trgr:create-trigger())
> 
>> xquery version "1.0-ml";
>> import module namespace trgr="http://marklogic.com/xdmp/triggers"; at 
>> "/MarkLogic/triggers.xqy";
>> 
>> trgr:create-trigger(
>>  "myTrigger",
>>  "Simple trigger example", 
>>  trgr:trigger-data-event(
>>  trgr:directory-scope("/myDir/", "1"),
>>  trgr:document-content("modify"),
>>  trgr:post-commit()
>>  ),
>>  trgr:trigger-module(xdmp:database("test"), "/modules/", "log.xqy"),
>>  fn:true(),
>>  xdmp:default-permissions()
>> )
> 
> 
> If a change is change is done on a document under 'myDir' directory, then the 
> modules log.xqy is triggered. This is just fine.
> But if we add any of these documents to a collection (any collection), this 
> trigger is handle too. 
> 
> I don't understand why ? Adding a document to a collection doesn't change the 
> document content. This just some kind of metadata.
> Why doesn't collection acts as properties for this use case ? Adding a 
> property to a collection doesn't handle the trigger. And if you wan't so, 
> then use trgr:property-content constraint.
> 
> The problem is that when the module is triggered I can't guess if it is 
> because content update (the case I wan't to work on) or if someone just add 
> this document to a collection (I don't care for this use case).
> 
> Could someone provide me information on this case ?
> 
> Thanks
> Stéphane
> 
> 
> 
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
> ___
> General mailing list
> General@developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general

___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Customizing Facets in App Builder (ML6.0)

2013-02-15 Thread James Fuller
Hello David,

custom/app-config.js was added in the maintenance release of MarkLogic
after ML6.0.

Please upgrade and use latest release of 6.0-2.3 and once you deploy a
new app from appbuilder you will see this new custom/app-config.js
file.

hth, Jim Fuller


On Thu, Feb 14, 2013 at 8:04 PM, Steiner, David J. (LNG-DAY)
 wrote:
> Ganesh and Mike,
>
>
>
> Thanks.  I understand what you’ve said here...
>
>
>
> However, I do not see a “custom/app-config.js” file.
>
> /application/custom/
>
> /application/custom/app.css
>
> /application/custom/app.js
>
> /application/custom/app.xsl
>
> /application/custom/contact.html
>
> /application/custom/content.xsl
>
> /application/custom/help.html
>
> /application/custom/rewrite.xml
>
> /application/custom/terms.html
>
>
>
> Are you saying that I need to create one?
>
> app-config.js is not mentioned in the Application Builder Developer’s Guide.
> Is it just a “known thing” that if you create a file with “-config” on it,
> it get’s loaded?  Or does it just load all “.js” in alphabetical order?
>
>
>
> The only files I see with “app” in the name in the custom directory are
> app.css, app.xml and app.js.
>
>
>
> If I am supposed to create a file called app-config.js, do I just upload it
> via WebDAV to the app’s modules DB, or am I supposed to do a document-load?
>
>
>
> Thanks,
> David
>
>
>
>
>
>
>
> From: general-boun...@developer.marklogic.com
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Ganesh
> Vaideeswaran
> Sent: Thursday, February 14, 2013 10:39 AM
> To: MarkLogic Developer Discussion
> Cc: Mike Wooldridge
> Subject: Re: [MarkLogic Dev General] Customizing Facets in App Builder
> (ML6.0)
>
>
>
> David,
>
>
>
> Mike Wooldridge from my team was kind enough to put together some sample
> code that might guide you in the right direction.
>
>
>
> One way is to copy and edit ML.createSidebar() function to do what you want
> and then putting that rewrite in custom/app-config.js.
>
>
>
> (Note: You cannot put this rewrite in custom/app.js and expect it to work
> because of the sequence in which the JS is loaded.)
>
>
>
> As an example, he has made some updates to ML.createSidebar() that maybe
> along the lines of what you looking for. It assumes the example Oscar setup
> and creates a relationship between the 'award' and 'win' facets. The 'win'
> facet only appears in the sidebar if an 'award' facet has been selected (so,
> it appears when the 'award' chiclet is appearing). I'm attaching the code
> (which would be saved inside custom/app-config.js). The update involves
> maintaining an 'invisible' array that tracks what facets should not be
> shown. (This is different from our 'hidden' array, which tracks when a facet
> list is collapsed and still shows its title.). Hope this helps.
>
>
>
> You have to rename the .txt file attached as .js
>
>
>
> Thanks Mike.
>
>
>
> Ganesh Vaideeswaran
>
> Director of Engineering, Application Services
>
> MarkLogic Corporation
>
> ganesh.vaideeswa...@markogic.com
>
> Phone: +1 650 655 2398
>
> www.marklogic.com
>
> This e-mail and any accompanying attachments are confidential. The
> information is intended solely for the use of the individual to whom it is
> addressed. Any review, disclosure, copying, distribution, or use of this
> e-mail communication by others is strictly prohibited. If you are not the
> intended recipient, please notify us immediately by returning this message
> to the sender and delete all copies. Thank you for your cooperation.
>
>
>
> From: general-boun...@developer.marklogic.com
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Steiner, David
> J. (LNG-DAY)
> Sent: Tuesday, February 12, 2013 7:04 AM
> To: MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] Customizing Facets in App Builder (ML6.0)
>
>
>
> I have a few high level constraints/facets that are based on collections
> (i.e., I simply gave no prefix in the specification and I get a facet for
> “collection” with the counts of all the docs in each collection).
>
>
>
> Now, I also have a bunch of other facets that I want to show up but only
> when someone picks a particular content type (different content types have
> different facets), i.e., someone clicks on one of the high level content
> types.
>
>
>
> I’m assuming that the only way I can modify the sidebar behavior for facets
> is to modify javascript – create custom javascript.  Is this correct?  Or is
> there I way I can accomplish this in an easier fashion?
>
> If I have to change the javascript, is there an example of how to do this
> somewhere?
>
>
>
> Also, I guess at a minimum, I’d like to have the ability to easily specify
> whether I wanted the facet to appear opened/expanded or closed.  So, for
> example, I’d like my collection facets to appear opened, but other range
> index facets to appear closed since there will be a lot of them and they
> will each have a lot of values.
>
>
>
> Thanks,
>
> David
>
>
>