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

2015-05-12 Thread Shannon
Thanks, Dave. Are there any plans to support JSONP or allow modification of the 
REST server’s response headers? I was attempting to take a 2-tier route, with 
HTTP/REST app servers on the same MarkLogic instance, but CORS is a 
roadblock—was planning to use app-level security and MarkLogic’s security model 
to “lock down” the app, or is a thin middle layer the only way to prevent 
exposing the REST API to the end users?

> On May 4, 2015, at 4:26 PM, Dave Cassel  wrote:
> 
> The approach used by Samplestack and some other applications is to have a 
> Node.js middle layer running on the same server. Node hosts the HTML, JS, and 
> CSS, and passes requests along to MarkLogic. Having Node (or something) in 
> between your end user and MarkLogic also allows you to controll access to the 
> REST API in a pretty granular way. You can probably set up Apache the same 
> way, passing requests to /v1/* or /v2/* to MarkLogic. 
> 
> -- 
> Dave Cassel <http://davidcassel.net/>, @dmcassel 
> <https://twitter.com/dmcassel>
> Developer Community Manager
> MarkLogic Corporation <http://www.marklogic.com/>
> MarkLogic World Tour:
> Washington, Amsterdam, London, Boston, Tokyo, Chicago, Houston, New York 
> <http://world.marklogic.com/locations/>
> 
> 
> From: Shannon mailto:shifl...@virginia.edu>>
> Reply-To: MarkLogic Developer Discussion  <mailto:general@developer.marklogic.com>>
> Date: Monday, May 4, 2015 at 3:53 PM
> To: General MarkLogic Developer Discussion  <mailto:general@developer.marklogic.com>>
> Subject: Re: [MarkLogic Dev General] Moving REST API Instance module code to 
> a directory in Modules database
> 
>> Hi Erik,
>> 
>> No problem, it was a great workshop.
>> 
>> Thanks for the information. In that case, I don’t know if it’s worthwhile to 
>> submit an RFE to put code on the file system instead of a modules database 
>> for an HTTP app server with the RESTful interface. My only concern is the 
>> extra time it takes to save edits, 1-2 seconds via WebDAV (mounted as a 
>> volume in OS X) vs. virtually instantaneously with Sublime Text locally. 
>> Alternative ways to keep the code on the file system would be to use 
>> standalone Apache and modify the HTTPD config file to allow for cross-domain 
>> requests. Or perhaps use JSONP requests in Angular—is that the only 
>> workaround for the security if I were to use a MarkLogic HTTP app server? In 
>> that case, would it actually be a 3-tier architecture even though the app 
>> and database servers are both on the same MarkLogic instance?
>> 
>> Thank you very much in advance for your time.
>> 
>> Best,
>> Shannon
>> 
>>> On May 3, 2015, at 11:07 AM, Erik Hennum >> <mailto:erik.hen...@marklogic.com>> wrote:
>>> Hi, Shannon:
>>> When a resource service or transform extension is installed, the REST API 
>>> generates some declarations and wrappers.  So, no, at present neither the 
>>> file system nor WebDav would work for such extensions.
>>> For libraries installed as /v1/ext/YOUR_PATH/YOUR_MODULE.js or xqy, it 
>>> _might_ work to put the same resources in 
>>> $MARKLOGIC_INSTALL_DIR/Modules/v1/ext/YOUR_PATH/YOUR_MODULE.js, but that's 
>>> a hack I've not tried. Even if that hack happens to work now, you wouldn't 
>>> want to build up any infrastructure around it because it could stop working 
>>> in the future.
>>> Erik Hennum
>>> PS  It was a great to meet in person, and thanks for toughing it out 
>>> through the logistical hiccups.
>>> 
>>> From: general-boun...@developer.marklogic.com 
>>> <mailto:general-boun...@developer.marklogic.com> 
>>> [general-boun...@developer.marklogic.com 
>>> <mailto:general-boun...@developer.marklogic.com>] on behalf of Shannon 
>>> [shifl...@virginia.edu <mailto:shifl...@virginia.edu>]
>>> Sent: Friday, May 01, 2015 3:18 PM
>>> To: General MarkLogic Developer Discussion
>>> Subject: Re: [MarkLogic Dev General] Moving REST API Instance module code 
>>> toa   directory in Modules database
>>> Hi Erik,
>>> is there any reason why the code can’t reside on the file system as opposed 
>>> to a modules database? I tried this to no avail. When developing locally, 
>>> I’m able to save edits to files a lot faster on the file system than over a 
>>> WebDAV server. Just half a second to a second, but that adds up.
>>> For one AngularJS app, I started with a plain vanilla HTTP server, and then 
>>> when I was ready 

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

2015-05-04 Thread Shannon
Hi Erik,

No problem, it was a great workshop.

Thanks for the information. In that case, I don’t know if it’s worthwhile to 
submit an RFE to put code on the file system instead of a modules database for 
an HTTP app server with the RESTful interface. My only concern is the extra 
time it takes to save edits, 1-2 seconds via WebDAV (mounted as a volume in OS 
X) vs. virtually instantaneously with Sublime Text locally. Alternative ways to 
keep the code on the file system would be to use standalone Apache and modify 
the HTTPD config file to allow for cross-domain requests. Or perhaps use JSONP 
requests in Angular—is that the only workaround for the security if I were to 
use a MarkLogic HTTP app server? In that case, would it actually be a 3-tier 
architecture even though the app and database servers are both on the same 
MarkLogic instance?

Thank you very much in advance for your time.

Best,
Shannon

> On May 3, 2015, at 11:07 AM, Erik Hennum  wrote:
> 
> Hi, Shannon:
> 
> When a resource service or transform extension is installed, the REST API 
> generates some declarations and wrappers.  So, no, at present neither the 
> file system nor WebDav would work for such extensions.
> 
> For libraries installed as /v1/ext/YOUR_PATH/YOUR_MODULE.js or xqy, it 
> _might_ work to put the same resources in 
> $MARKLOGIC_INSTALL_DIR/Modules/v1/ext/YOUR_PATH/YOUR_MODULE.js, but that's a 
> hack I've not tried. Even if that hack happens to work now, you wouldn't want 
> to build up any infrastructure around it because it could stop working in the 
> future.
> 
> 
> Erik Hennum
> 
> PS  It was a great to meet in person, and thanks for toughing it out through 
> the logistical hiccups.
> 
> 
> From: general-boun...@developer.marklogic.com 
> [general-boun...@developer.marklogic.com] on behalf of Shannon 
> [shifl...@virginia.edu]
> Sent: Friday, May 01, 2015 3:18 PM
> To: General MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Moving REST API Instance module code to  
>   a   directory in Modules database
> 
> Hi Erik,
> 
> is there any reason why the code can’t reside on the file system as opposed 
> to a modules database? I tried this to no avail. When developing locally, I’m 
> able to save edits to files a lot faster on the file system than over a 
> WebDAV server. Just half a second to a second, but that adds up.
> 
> For one AngularJS app, I started with a plain vanilla HTTP server, and then 
> when I was ready to work with $resource, I setup a REST server on another 
> port. I thought I’d be able to develop the app on the file system on the HTTP 
> server, but of course I ran into cross-domain JS security, being on two 
> different ports (using a 2-tier architecture). So I conflated the servers, 
> but that meant moving the code to a modules database.
> 
> BTW, thanks again for all your help in the workshop :-)
> 
> Best,
> Shannon
> 
>> Hi, Danny:
>> 
>> The REST API doesn't support sharing modules databases between REST servers 
>> or providing an interface for renaming managed resources in the modules 
>> database.
>> 
>> There could be a number of issues (for instance, permissions on the options 
>> file), but working through the issues on an unsupported operation would be 
>> guesswork.
>> 
>> Part of the rationale for the one-to-one relation between modules databases 
>> and REST servers was to make it easy to package up a REST implementation on 
>> a development environment and push it to a production server.
>> 
>> Can you expand on the issues you're running into with that one-to-one 
>> approach?
>> 
>> 
>> Thanks,
>> 
>> 
>> Erik Hennum
>> 
>> 
>> From:
>> general-bounces at developer.marklogic.com [general-bounces at 
>> developer.marklogic.com] on behalf of Danny Sinang [d.sinang at gmail.com
>> ]
>> Sent: Wednesday, April 29, 2015 8:12 AM
>> To: general
>> Subject: [MarkLogic Dev General] Moving REST API Instance module code to a 
>> directory in Modules database
>> 
>> We have a REST API instance running on port 9042 on our DEV cluster and it 
>> works fine.
>> 
>> When this instance was created, a new modules databases called 
>> 9042_imagechallenge-rest-modules was created for it by ML.
>> 
>> I'm trying to avoid minimize the number of modules databases we have, so I :
>> 
>> 1. Copied the code from 9042_imagechallenge-rest-modules to a new directory 
>> called "/imagechallenge_rest" in our Modules database.
>> 
>> 2. Reconfigured our 9042-image

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

2015-05-01 Thread Shannon
Hi Erik,

is there any reason why the code can’t reside on the file system as opposed to 
a modules database? I tried this to no avail. When developing locally, I’m able 
to save edits to files a lot faster on the file system than over a WebDAV 
server. Just half a second to a second, but that adds up.

For one AngularJS app, I started with a plain vanilla HTTP server, and then 
when I was ready to work with $resource, I setup a REST server on another port. 
I thought I’d be able to develop the app on the file system on the HTTP server, 
but of course I ran into cross-domain JS security, being on two different ports 
(using a 2-tier architecture). So I conflated the servers, but that meant 
moving the code to a modules database.

BTW, thanks again for all your help in the workshop :-)

Best,
Shannon

> Hi, Danny:
> 
> The REST API doesn't support sharing modules databases between REST servers 
> or providing an interface for renaming managed resources in the modules 
> database.
> 
> There could be a number of issues (for instance, permissions on the options 
> file), but working through the issues on an unsupported operation would be 
> guesswork.
> 
> Part of the rationale for the one-to-one relation between modules databases 
> and REST servers was to make it easy to package up a REST implementation on a 
> development environment and push it to a production server.
> 
> Can you expand on the issues you're running into with that one-to-one 
> approach?
> 
> 
> Thanks,
> 
> 
> Erik Hennum
> 
> 
> From: 
> general-bounces at developer.marklogic.com [general-bounces at 
> developer.marklogic.com] on behalf of Danny Sinang [d.sinang at gmail.com
> ]
> Sent: Wednesday, April 29, 2015 8:12 AM
> To: general
> Subject: [MarkLogic Dev General] Moving REST API Instance module code to a 
> directory in Modules database
> 
> We have a REST API instance running on port 9042 on our DEV cluster and it 
> works fine.
> 
> When this instance was created, a new modules databases called 
> 9042_imagechallenge-rest-modules was created for it by ML.
> 
> I'm trying to avoid minimize the number of modules databases we have, so I :
> 
> 1. Copied the code from 9042_imagechallenge-rest-modules to a new directory 
> called "/imagechallenge_rest" in our Modules database.
> 
> 2. Reconfigured our 9042-imagechallenge-rest app service to use 
> /imagechallenge_rest as its root and Modules as its modules database.
> 
> After step 2, I visited :
> 
> 
> http://marklogic-dev.mycompany.com:9042/v1/search?q=published:true&options=image_challenge
> 
> 
> and now I'm getting this error :
> 
> http://marklogic.com/xdmp/error";
> >
> 400
> Bad Request
> REST-INVALIDPARAM
> REST-INVALIDPARAM: (err:FOER) Invalid parameter: No configured 
> options: image_challenge
> 
> 
> 
> I checked the /imagechallenge_rest directory and this "missing" option file 
> is indeed under :
> 
> /imagechallenge_rest/Default/9042-imagechallenge-rest/rest-api/options .
> 
> 
> What could I be missing ?
> 
> Regards,
> Danny
> 
> 
___
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] docs.marklogic.com

2015-03-11 Thread Shannon
Hi,

docs.marklogic.com seems to be malfunctioning — is there another way to look up 
the API docs for XQuery/XSLT functions? The link to download docs is a 404.

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


Re: [MarkLogic Dev General] Odd or Expected Behavior by Widget?

2014-09-11 Thread Shannon
David, this may be neither here nor there, but have you tried setting the axis 
type in custom/skin.js to "datetime”?

Shannon

> On Sep 11, 2014, at 8:36 AM, Steiner, David J. (LNG-DAY) 
>  wrote:
> 
> ML 7.0-3
>  
> I created a field that has years in it, i.e., 2010.  I set the range index on 
> it to be “gYear”.
>  
> I specified a Widget in App Builder to use the Field so I can get the Count 
> of all occurances of each year.  The chart that it produced is confusing – 
> start with midnight and goes for 48 seconds?
>  
> 
>  
> Is this expected behavior for “gYear” range indexes, or do I have to do 
> something to get the year values to appear as the “Year” axis?
>  
> Thanks,
> David
> ___
> General mailing list
> General@developer.marklogic.com <mailto:General@developer.marklogic.com>
> http://developer.marklogic.com/mailman/listinfo/general 
> <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] Search API/AppBuilder default sort order

2013-12-19 Thread Shannon Scott Shiflett
Apparently operator is the wrong container anyway as I want the secondary sort 
to be active by default--seems to work by using two sort-order elements in the 
proper order:

  

  
  http://marklogic.com/collation/";>
http://rotunda.upress.virginia.edu/pfe"; 
name="fullname"/>
  

On Dec 19, 2013, at 3:02 PM, Shannon Scott Shiflett  
wrote:

> Hello,
> 
> is there a way to effect the default relevance sort so as to include a 
> secondary sort? I added the sort-order to the options node, but it only 
> becomes active when selecting from the sort menu--it does not appear to be 
> applied when the results are initially served up. Can this be patched into 
> Search API or should I be looking to customize the JavaScript results widget?
> 
> 
> 
>   
>   
>   
>collation="http://marklogic.com/collation/";>
>   http://rotunda.upress.virginia.edu/pfe"; 
> name="fullname"/>
>   
> 
> [...]
> 
> Thanks,
> Shannon
> ___
> 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


[MarkLogic Dev General] Search API/AppBuilder default sort order

2013-12-19 Thread Shannon Scott Shiflett
Hello,

is there a way to effect the default relevance sort so as to include a 
secondary sort? I added the sort-order to the options node, but it only becomes 
active when selecting from the sort menu--it does not appear to be applied when 
the results are initially served up. Can this be patched into Search API or 
should I be looking to customize the JavaScript results widget?



  

  
  http://marklogic.com/collation/";>
http://rotunda.upress.virginia.edu/pfe"; 
name="fullname"/>
  

[...]

Thanks,
Shannon___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Thesaurus & Search API

2013-12-14 Thread Shannon Scott Shiflett

Hi,

can we use thesaurus functions with Search API? Could AppBuilder support it 
through a custom constraint? Thanks.

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


Re: [MarkLogic Dev General] Field Include

2012-10-24 Thread Shannon Scott Shiflett
Hi Mike,

Many thanks. It won't take long to update the project's preprocessing files, 
transform, load. They were designed to use attributes for this data because I'm 
certain there will be no mixed content and contain only a few short word tokens 
belonging to a controlled vocabulary. I thought it would be fine to use an 
attribute range index for that purpose, I wasn't aware that a specific value 
was required until I found I wanted to include the values in a 
default-suggestion-source. I need more than one index to be the source, so a 
field is called for. I agree that it would be nice to make use of existing 
attribute range indexes, but it's probably not worth an RFE in this case--easy 
workaround, small dataset.

Thanks,
Shannon 

On Oct 24, 2012, at 11:20 AM, Michael Blakeley  wrote:

> Is the goal to set up a field that indexes attribute words? As far as I know 
> that isn't possible. Fields only seem to pick up word-query terms, whatever 
> the include-exclude settings. This makes more sense if you recall that 
> attribute words match cts:element-attribute-word-query(), but attribute words 
> don't match cts:word-query().
> 
> cts:contains(
>  hello world,
>  cts:word-query('hello')),
> cts:contains(
>  ,
>  cts:word-query('hello')),
> cts:contains(
>  ,
>  cts:element-attribute-word-query(
>xs:QName('p'), xs:QName('value'), 'hello'))
> =>
> true
> false
> true
> 
> It would be nice to have the option to index attribute words in word-query 
> and fields, but for now I think you'd have to transform or duplicate the 
> attribute words as element words.
> 
> -- Mike
> 
> On 24 Oct 2012, at 07:18 , Shannon Scott Shiflett  
> wrote:
> 
>> Hi,
>> 
>> Is it possible to include an attribute in a field index without specifying a 
>> value? Would you recommend preprocessing? 
>> 
>> Thanks.
>> ___
>> 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


[MarkLogic Dev General] Field Include

2012-10-24 Thread Shannon Scott Shiflett
Hi,

Is it possible to include an attribute in a field index without specifying a 
value? Would you recommend preprocessing? 

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


[MarkLogic Dev General] Customizing the Generated Search Options Node

2012-10-23 Thread Shannon Scott Shiflett
Hi App Services,

What is the $ADDITIONAL-OPTIONS equivalent in the new AppBuilder?

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


[MarkLogic Dev General] Thesaurus question

2012-06-27 Thread Shannon
Hi,

Will MarkLogic have search issues if I leave the part-of-speech element out of 
my thsr doc? It's not required by the schema, but it appears in all of your 
examples. I will replicate many entries and that info will be unknown. Maybe 
it's added value but unnecessary? 

Thanks,

    Shannon (shifl...@virginia.edu)
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] MarkLogic websites offline?

2012-06-23 Thread Shannon
I'm afraid so, Justin. Traceroute indicates a bad hop near me--none of your 
pages load, although every other random site I've tried does, so I wanted to 
verify, thanks for your help. I'll dig up a local copy of the API docs.

On Jun 23, 2012, at 2:11 PM, Justin Makeig wrote:

> Looks up for me. Are you still unable access these (11:11 PDT)?
> 
> Justin
> 
> 
> 
> On Jun 23, 2012, at 10:53 AM, Shannon wrote:
> 
>> 
>> Just me or are some of your sites down, such as community.marklogic.com and 
>> markmail.org?
>> ___
>> General mailing list
>> General@developer.marklogic.com
>> http://community.marklogic.com/mailman/listinfo/general
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://community.marklogic.com/mailman/listinfo/general

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


[MarkLogic Dev General] MarkLogic websites offline?

2012-06-23 Thread Shannon

Just me or are some of your sites down, such as community.marklogic.com and 
markmail.org?
___
General mailing list
General@developer.marklogic.com
http://community.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] JSON with MarkLogic

2012-06-20 Thread Shannon

Hi David,

More feedback on xdmp:to-json. Correct me if I'm missing something, but it does 
not return parseable JSON for sequences of one: 

xdmp:to-json(
  ("foo")
)
=>
"foo"

That does not validate, as you know a '{' or '[' is expected; in this case a 
'[', as in:

xdmp:to-json(
  ("foo","bar")
)
=>
["foo", "bar"]

Please confirm, feature or bug?

Thanks,
Shannon

On Jun 14, 2012, at 10:07 AM, David Lee wrote:

> Thanks Shannon, we definitely appreciate your input.
> 
> 
>> -Original Message-
>> From: general-boun...@developer.marklogic.com [mailto:general-
>> boun...@developer.marklogic.com] On Behalf Of Shannon
>> Sent: Thursday, June 14, 2012 10:03 AM
>> To: MarkLogic Developer Discussion
>> Subject: Re: [MarkLogic Dev General] JSON with MarkLogic
>> 
>> You're right, David, having thought it out some more, that's what I arrived 
>> at
>> too--see my last post. I'm thinking about jQuery UI widgets. Sure I could 
>> send
>> XML and parse it, but there are advantages to JSON. Provided that there are
>> one or two common use cases, is it fair, and not so terribly tricky, to 
>> expect a
>> specified XML structure as input xdmp:to-json? Although even then it sounds
>> like there could be trouble based on your answer. I'm sure I need to look 
>> into
>> the aforementioned libraries, though wanted to give Justin that feedback.
>> 
>> On Jun 14, 2012, at 9:40 AM, David Lee wrote:
>> 
>>> Thanks for your feedback.
>>> What you are asking for is a particularly tough model to translate without
>> complex custom code.   It takes recognizing pairs (tripples? quadruples? 
>> ...) of
>> replicated element names as representing arrays.  In fact the XML example
>> you show is difficult to deal with in the pure XML realm as well.
>>> 
>>> Something like this would be easier to recognize/configure as a JSON array
>> and/or process with pure XML tools
>>> 
>>> 
>>> 
>>> value
>>> books
>>> 
>>> 
>>> value2
>>> books2
>>> 
>>> 
>>> ...
>>> 
>>> 
>>> 
>>>> -Original Message-
>>>> From: general-boun...@developer.marklogic.com [mailto:general-
>>>> boun...@developer.marklogic.com] On Behalf Of Shannon
>>>> Sent: Thursday, June 14, 2012 9:22 AM
>>>> To: MarkLogic Developer Discussion
>>>> Subject: Re: [MarkLogic Dev General] JSON with MarkLogic
>>>> 
>>>> Correction:
>>>> 
>>>>> 
>>>>> value
>>>>> books
>>>>> [...]
>>>>> 
>>>> 
>>>> 
>>>> On Jun 14, 2012, at 9:17 AM, Shannon wrote:
>>>> 
>>>>> Justin stated that MarkLogic is looking to improve built-in JSON support
>> and
>>>> requested details on what we are trying to accomplish. It is helpful for
>>>> returning an array of strings, but I'm seeking to convert an XML structure
>> into
>>>> an array of objects, e.g.,
>>>>> 
>>>>> 
>>>>> value
>>>>> books
>>>>> [...]
>>>>> 
>>>>> 
>>>>> =>
>>>>> 
>>>>> [ { label: "value", category: "books" }, ... ]
>>>>> 
>>>>> I know about mljson and map:map, but I wanted to share a frequent case
>>>> that could make xdmp:to-json more useful--maybe flags for alternate
>>>> serializations?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>>   Shannon (shifl...@virginia.edu)
>>>>>   http://www.facebook.com/uvapress
>>>>>   http://www.twitter.com/uvapress
>>>>> 
>>>>> ___
>>>>> General mailing list
>>>>> General@developer.marklogic.com
>>>>> http://community.marklogic.com/mailman/listinfo/general
>>>> 
>>>> ___
>>>> General mailing list
>>>> General@developer.marklogic.com
>>>> http://community.marklogic.com/mailman/listinfo/general
>>> ___
>>> General mailing list
>>> General@developer.marklogic.com
>>> http://community.marklogic.com/mailman/listinfo/general
>> 
>> ___
>> General mailing list
>> General@developer.marklogic.com
>> http://community.marklogic.com/mailman/listinfo/general
> ___
> General mailing list
> General@developer.marklogic.com
> http://community.marklogic.com/mailman/listinfo/general

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


Re: [MarkLogic Dev General] JSON with MarkLogic

2012-06-14 Thread Shannon
You're right, David, having thought it out some more, that's what I arrived at 
too--see my last post. I'm thinking about jQuery UI widgets. Sure I could send 
XML and parse it, but there are advantages to JSON. Provided that there are one 
or two common use cases, is it fair, and not so terribly tricky, to expect a 
specified XML structure as input xdmp:to-json? Although even then it sounds 
like there could be trouble based on your answer. I'm sure I need to look into 
the aforementioned libraries, though wanted to give Justin that feedback.

On Jun 14, 2012, at 9:40 AM, David Lee wrote:

> Thanks for your feedback.
> What you are asking for is a particularly tough model to translate without 
> complex custom code.   It takes recognizing pairs (tripples? quadruples? ...) 
> of replicated element names as representing arrays.  In fact the XML example 
> you show is difficult to deal with in the pure XML realm as well.
> 
> Something like this would be easier to recognize/configure as a JSON array 
> and/or process with pure XML tools
> 
> 
> 
> value
> books
> 
> 
> value2
> books2
> 
> 
> ...
> 
> 
> 
>> -Original Message-
>> From: general-boun...@developer.marklogic.com [mailto:general-
>> boun...@developer.marklogic.com] On Behalf Of Shannon
>> Sent: Thursday, June 14, 2012 9:22 AM
>> To: MarkLogic Developer Discussion
>> Subject: Re: [MarkLogic Dev General] JSON with MarkLogic
>> 
>> Correction:
>> 
>>> 
>>> value
>>> books
>>> [...]
>>> 
>> 
>> 
>> On Jun 14, 2012, at 9:17 AM, Shannon wrote:
>> 
>>> Justin stated that MarkLogic is looking to improve built-in JSON support and
>> requested details on what we are trying to accomplish. It is helpful for
>> returning an array of strings, but I'm seeking to convert an XML structure 
>> into
>> an array of objects, e.g.,
>>> 
>>> 
>>> value
>>> books
>>> [...]
>>> 
>>> 
>>> =>
>>> 
>>> [ { label: "value", category: "books" }, ... ]
>>> 
>>> I know about mljson and map:map, but I wanted to share a frequent case
>> that could make xdmp:to-json more useful--maybe flags for alternate
>> serializations?
>>> 
>>> Thanks,
>>> 
>>> Shannon (shifl...@virginia.edu)
>>> http://www.facebook.com/uvapress
>>> http://www.twitter.com/uvapress
>>> 
>>> ___
>>> General mailing list
>>> General@developer.marklogic.com
>>> http://community.marklogic.com/mailman/listinfo/general
>> 
>> ___
>> General mailing list
>> General@developer.marklogic.com
>> http://community.marklogic.com/mailman/listinfo/general
> ___
> General mailing list
> General@developer.marklogic.com
> http://community.marklogic.com/mailman/listinfo/general

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


Re: [MarkLogic Dev General] JSON with MarkLogic

2012-06-14 Thread Shannon
In fact, two cases. First, an object with multiple name/value pairs. Second, an 
array of objects. 

Perhaps:


 
  value
  books
  [...]
 
 
  value
  magazines
  [...]
 
 [...]


=>

{
"select": [
 { "label":"value" , "category":"books", [...]}, 
 { "label":"value" , "category":"magazines" }, 
 [...]
 ],
[...]
}

Apologies for any syntactical mistakes--just proposing some patterns
Thanks.

On Jun 14, 2012, at 9:17 AM, Shannon wrote:

> Justin stated that MarkLogic is looking to improve built-in JSON support and 
> requested details on what we are trying to accomplish. It is helpful for 
> returning an array of strings, but I'm seeking to convert an XML structure 
> into an array of objects, e.g.,
> 
> 
>  value
>  books
>  [...]
> 
> 
> =>
> 
> [ { label: "value", category: "books" }, ... ]
> 
> I know about mljson and map:map, but I wanted to share a frequent case that 
> could make xdmp:to-json more useful--maybe flags for alternate serializations?
> 
> Thanks,
> 
>   Shannon (shifl...@virginia.edu)
>   http://www.facebook.com/uvapress
>   http://www.twitter.com/uvapress
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://community.marklogic.com/mailman/listinfo/general

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


Re: [MarkLogic Dev General] JSON with MarkLogic

2012-06-14 Thread Shannon
Correction:

> 
>  value
>  books
>  [...]
> 


On Jun 14, 2012, at 9:17 AM, Shannon wrote:

> Justin stated that MarkLogic is looking to improve built-in JSON support and 
> requested details on what we are trying to accomplish. It is helpful for 
> returning an array of strings, but I'm seeking to convert an XML structure 
> into an array of objects, e.g.,
> 
> 
>  value
>  books
>  [...]
> 
> 
> =>
> 
> [ { label: "value", category: "books" }, ... ]
> 
> I know about mljson and map:map, but I wanted to share a frequent case that 
> could make xdmp:to-json more useful--maybe flags for alternate serializations?
> 
> Thanks,
> 
>   Shannon (shifl...@virginia.edu)
>   http://www.facebook.com/uvapress
>   http://www.twitter.com/uvapress
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://community.marklogic.com/mailman/listinfo/general

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


[MarkLogic Dev General] JSON with MarkLogic

2012-06-14 Thread Shannon
Justin stated that MarkLogic is looking to improve built-in JSON support and 
requested details on what we are trying to accomplish. It is helpful for 
returning an array of strings, but I'm seeking to convert an XML structure into 
an array of objects, e.g.,


  value
  books
  [...]


=>

[ { label: "value", category: "books" }, ... ]

I know about mljson and map:map, but I wanted to share a frequent case that 
could make xdmp:to-json more useful--maybe flags for alternate serializations?

Thanks,

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

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


Re: [MarkLogic Dev General] Same database for modules and data

2012-06-08 Thread Shannon
Thanks for this thorough response, Danny--Right, content will be rarely if ever 
updated, so it sounds like it'll make maintenance more convenient with no 
negative side effects, very good, thanks,

    Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

On Jun 7, 2012, at 6:00 PM, Danny Sokolsky wrote:

> Hi Shannon,
> 
> If your tiny dataset is read-mostly (that is, if it rarely if ever is updated 
> or added to), then I would say it is OK.  The only disadvantage that I know 
> of with sharing a modules db with content is that it might cause your modules 
> to need to be re-cached more often, when other content is loaded.
> 
> Also, it depends if you gain any advantages from doing this, which you might 
> (such as relative paths between your code and your content, ability to back 
> it all up in one shot, etc).
> 
> So it depends.  
> 
> -Danny
> 
> -Original Message-
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
> Sent: Thursday, June 07, 2012 2:44 PM
> To: General MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] Same database for modules and data
> 
> Hello MarkLogicians, et al.,
> 
> I am thinking about loading my tiny dataset in my modules database--Is this 
> an OK practice? Or is it best practice to keep them separate?
> 
> Thanks,
> 
>   Shannon (shifl...@virginia.edu)
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://community.marklogic.com/mailman/listinfo/general
> ___
> General mailing list
> General@developer.marklogic.com
> http://community.marklogic.com/mailman/listinfo/general

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


[MarkLogic Dev General] Same database for modules and data

2012-06-07 Thread Shannon
Hello MarkLogicians, et al.,

I am thinking about loading my tiny dataset in my modules database--Is this an 
OK practice? Or is it best practice to keep them separate?

Thanks,

Shannon (shifl...@virginia.edu)

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


Re: [MarkLogic Dev General] Invalid protocol scheme ith dmp:document-get

2011-11-10 Thread Shannon
Hey Danny, I haven't worked in the Windows environment in years, but I thought 
the syntax looked right--it's as if the function was seeing "C:" as a protocol 
rather than the absolute path. 


On Thursday, November 10, 2011 at 2:38 PM, Danny Sokolsky wrote:

> You are correct Shannon, that should work on Windows, as on Windows that is 
> valid. That is not a valid scheme on UNIX-based systems, however. 
> 
> Gurbeer, what platform and version are you on (that is, that the server is 
> running under)? To figure this out:
> 
> xdmp:platform(), xdmp:architecture(), xdmp:version() 
> 
> -Danny
> 
> -Original Message-
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
> Sent: Thursday, November 10, 2011 11:28 AM
> To: General MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Invalid protocol scheme ith 
> dmp:document-get
> 
> David, that's not how the API reference reads to me: "Paramter: $location: 
> The location of the input document. If the scheme of the location is HTTP 
> (that is, if the string starts with "http://";), then the document is 
> requested over HTTP. If the scheme is file (that is, if the string starts 
> with "file://"), then the document is requested over file protocol from the 
> local filesystem. Otherwise, the document is fetched from the local 
> filesystem. On the filesystem, the path can be fully qualifed [sic] or 
> relative. Relative pathnames are resolved from the directory in which 
> MarkLogic Server is installed." If no protocol is specified, then an absolute 
> or relative filesystem path should suffice. Am I misinterpreting?
> 
> 
> On Thursday, November 10, 2011 at 2:24 PM, Lee, David wrote:
> 
> > 
> > document-get is expecting a URL (not a file path)
> > 
> > 
> > You should use the file:// scheme
> > 
> > 
> > http://en.wikipedia.org/wiki/File_URI_scheme
> > 
> > 
> > 
> > 
> > 
> > 
> > In your case
> > 
> > 
> > 
> > 
> > file:///c:/ Documents%20and%20Settings/gurbeers/Desktop/bulk/abc.xml
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > David A. Lee
> > 
> > 
> > Senior Principal Software Engineer
> > 
> > 
> > Epocrates, Inc.
> > 
> > 
> > d...@epocrates.com (mailto:d...@epocrates.com)
> > 
> > 
> > 812-482-5224
> > 
> > 
> > 
> > 
> > 
> > From: general-boun...@developer.marklogic.com 
> > [mailto:general-boun...@developer.marklogic.com] On Behalf Of Singh, Gurbeer
> > Sent: Thursday, November 10, 2011 2:19 PM
> > To: general@developer.marklogic.com (mailto:general@developer.marklogic.com)
> > Subject: [MarkLogic Dev General] Invalid protocol scheme with 
> > xdmp:document-get
> > 
> > 
> > 
> > 
> > 
> > 
> > Hi 
> > 
> > 
> > 
> > 
> > Is there anything wrong , when I am running below query in cq its giving 
> > error Invalid protocol scheme: C
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > declare variable $doc := xdmp:document-get("C:\Documents and 
> > Settings\gurbeers\Desktop\bulk\abc.xml", 
> > 
> > 
> >  xml );
> > 
> > 
> > 
> > 
> > return $doc
> > 
> > 
> > 
> > 
> > [1.0-ml] XDMP-INVSCHEME: xdmp:document-get("C:\Documents and 
> > Settings\gurbeers\Desktop\bulk\abc.xml",  > xmlns="xdmp:document-get">xml) -- Invalid 
> > protocol scheme: C
> > 
> > 
> > 
> > 
> > 
> > 
> > ~Gurbeer
> > 
> > 
> > 
> > 
> > 
> > NOTICE: Morgan Stanley is not acting as a municipal advisor and the 
> > opinions or views contained herein are not intended to be, and do not 
> > constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall 
> > Street Reform and Consumer Protection Act. If you have received this 
> > communication in error, please destroy all electronic and paper copies and 
> > notify the sender immediately. Mistransmission is not intended to waive 
> > confidentiality or privilege. Morgan Stanley reserves the right, to the 
> > extent permitted under applicable law, to monitor electronic 
> > communications. This message is subject to terms available at the following 
> > link: http://www.morganstanley.com/disclaimers. If you cannot access these 

Re: [MarkLogic Dev General] Invalid protocol scheme ith dmp:document-get

2011-11-10 Thread Shannon
David, that's not how the API reference reads to me: "Paramter: $location: The 
location of the input document. If the scheme of the location is HTTP (that is, 
if the string starts with "http://";), then the document is requested over HTTP. 
If the scheme is file (that is, if the string starts with "file://"), then the 
document is requested over file protocol from the local filesystem. Otherwise, 
the document is fetched from the local filesystem. On the filesystem, the path 
can be fully qualifed [sic] or relative. Relative pathnames are resolved from 
the directory in which MarkLogic Server is installed." If no protocol is 
specified, then an absolute or relative filesystem path should suffice. Am I 
misinterpreting?


On Thursday, November 10, 2011 at 2:24 PM, Lee, David wrote:

> 
> document-get is expecting a URL (not a file path)
> 
> 
> You should use the file:// scheme
> 
> 
> http://en.wikipedia.org/wiki/File_URI_scheme
> 
> 
> 
> 
> 
> 
> In your case
> 
> 
> 
> 
> file:///c:/ Documents%20and%20Settings/gurbeers/Desktop/bulk/abc.xml
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> David A. Lee
> 
> 
> Senior Principal Software Engineer
> 
> 
> Epocrates, Inc.
> 
> 
> d...@epocrates.com (mailto:d...@epocrates.com)
> 
> 
> 812-482-5224
> 
> 
> 
> 
> 
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Singh, Gurbeer
> Sent: Thursday, November 10, 2011 2:19 PM
> To: general@developer.marklogic.com (mailto:general@developer.marklogic.com)
> Subject: [MarkLogic Dev General] Invalid protocol scheme with 
> xdmp:document-get
> 
> 
> 
> 
> 
> 
> Hi 
> 
> 
> 
> 
> Is there anything wrong , when I am running below query in cq its giving 
> error Invalid protocol scheme: C
> 
> 
> 
> 
> 
> 
> 
> 
> declare variable $doc := xdmp:document-get("C:\Documents and 
> Settings\gurbeers\Desktop\bulk\abc.xml", 
> 
> 
>  xml );
> 
> 
> 
> 
> return $doc
> 
> 
> 
> 
> [1.0-ml] XDMP-INVSCHEME: xdmp:document-get("C:\Documents and 
> Settings\gurbeers\Desktop\bulk\abc.xml",  xmlns="xdmp:document-get">xml) -- Invalid protocol 
> scheme: C
> 
> 
> 
> 
> 
> 
> ~Gurbeer
> 
> 
> 
> 
> 
> NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions 
> or views contained herein are not intended to be, and do not constitute, 
> advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform 
> and Consumer Protection Act. If you have received this communication in 
> error, please destroy all electronic and paper copies and notify the sender 
> immediately. Mistransmission is not intended to waive confidentiality or 
> privilege. Morgan Stanley reserves the right, to the extent permitted under 
> applicable law, to monitor electronic communications. This message is subject 
> to terms available at the following link: 
> http://www.morganstanley.com/disclaimers. If you cannot access these links, 
> please notify us by reply message and we will send the contents to you. By 
> messaging with Morgan Stanley you consent to the foregoing.
> 
> 
> 
> 
> ___
> General mailing list
> General@developer.marklogic.com (mailto: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


[MarkLogic Dev General] Quick Mac version backup question

2011-11-03 Thread Shannon
Hi, before upgrading to v5 on an iMac, I want to backup MarkLogic, just to be 
on the safe side. Is that simply a matter of duplicating the Library/MarkLogic 
directory in my home directory? I would like to know if there is more data I 
should duplicate. Asking because on Red Hat there's /opt/MarkLogic and 
/var/opt/MarkLogic but don't see that being the case on OS X. Thanks.
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Happy 11/1/11 (or in Europe 1/11/11) - MarkLogic 5 is here!

2011-11-01 Thread Shannon
+1 indeed: yes, redesigned DMC is awesome; so is the new-feature list, 
especially the ability to create faceted constraints from fields--looking 
forward to checking out all the new goods,

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

On Nov 1, 2011, at 3:20 PM, Geert Josten wrote:

> +1! Excellent job on the new DMC (and awesome ML 5 is finally out!!)
>  
> Van: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] Namens Eric Bloch
> Verzonden: dinsdag 1 november 2011 18:58
> Aan: General MarkLogic Developer Discussion
> Onderwerp: [MarkLogic Dev General] Happy 11/1/11 (or in Europe 1/11/11) - 
> MarkLogic 5 is here!
>  
> Hey Folks,
>  
> The MarkLogic 5 downloads and docs are available now!
>  
> There's a short post on our updated site along with a summary of some of the 
> new features.   Full details are in the Release Notes.  And some interesting 
> new resources for you too:
>  
> Express License - free for developers, including production use.
> New tutorials,  including an interactive one, and some screencasts.
> An open-source, community-sponsored (labs-style) REST interface with support 
> for both XML and JSON
>  
> Thanks belong to a number of folks here at MarkLogic, not the least of which 
> are the rocketship-of-awesome product, documentation, and engineering teams.  
>  
> Personal shout outs to Evan Lenz, who put up with my crazy schedule and made 
> things happen, our friends Kristina Schneider, Ylva Wickberg and Adam London 
> who helped with the developer site design and UI, and Jason Hunter and Ryan 
> Grimm, who've helps with so many things I can't recall, but for sure the 
> interactive tutorial and the REST interface. 
>  
> Stay tuned for more :)
>  
> -Eric
>  
> Eric Bloch
> Director, Community
> MarkLogic Corporation
>  
> desk +1 650 655 2390 | mobile +1 650 339 0376
> email  eric.bl...@marklogic.com 
> webdeveloper.marklogic.com 
> twitter @eedeebee
>  
> ___
> 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] Modifying an existing option in Application Builder

2011-09-08 Thread Shannon
Colleen, works perfectly! That's how we override specific options in 4.2. Big 
help. Thanks.

On Sep 7, 2011, at 12:55 PM, Colleen Whitney wrote:

> Try this in your appfunctions.xqy file:
> 
> declare variable $OPTIONS := 
>http://marklogic.com/appservices/search";>
>20
>{for $opt in $config:OPTIONS-STANDARD/* except 
> $config:OPTIONS-STANDARD/search:page-length 
> return $opt}
>
> ;
> You'll want to verify that it pulls in any $ADDITIONAL-OPTIONS (looks like it 
> should, but I haven't tested it).  Let me know if this does the job.
> 
> --Colleen
> 
> From: general-boun...@developer.marklogic.com 
> [general-boun...@developer.marklogic.com] On Behalf Of Shannon 
> [shifl...@virginia.edu]
> Sent: Tuesday, September 06, 2011 12:01 PM
> To: Colleen Whitney
> Cc: General MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Modifying an existing option in
> Application Builder
> 
> Thanks for the help, Colleen. Let's see, I would like a page-length of 20 
> instead of the default 10. I could make notes on what to change after 
> redeploying, but that would be undesirable (could grow to be impractical). 
> One solution would be to add more options to the UI :-) Until then, I'm happy 
> to apply any clever workaround you may come up with. Thanks!
> 
> On Sep 3, 2011, at 6:10 PM, Colleen Whitney wrote:
> 
>> Shannon, I don't think there's a way to override specific options in 4.2.  
>> Are you willing to share an example of an option you're trying to override 
>> but can't?  We might be able to figure out a clever way around it.
>> 
>> Thanks,
>> 
>> --Colleen
>> 
>> From: general-boun...@developer.marklogic.com 
>> [general-boun...@developer.marklogic.com] On Behalf Of Shannon 
>> [shifl...@virginia.edu]
>> Sent: Friday, September 02, 2011 12:04 PM
>> To: General MarkLogic Developer Discussion
>> Subject: [MarkLogic Dev General] Modifying an existing option in Application 
>>Builder
>> 
>> Hi,
>> 
>> Section 4.3.7.2 describes the practice of copying the entire options node 
>> from config.xqy and pasting into $OPTIONS in appfunctions.xqy when there is 
>> a need to override the property of an existing options node (as opposed to 
>> appending a new one using $ADDITIONAL-OPTIONS). The design pattern works, 
>> but when you make a change to the app that affects options and redeploy, an 
>> outdated options node will persist, the updates to options will not be in 
>> effect. How can I modify an existing option without breaking the design 
>> pattern that permits redeployment?
>> 
>> Best,
>> Shannon
>> 
>> P.S. There's an AppBuilder code comment declaring version 1.0. Is that the 
>> official version number?
>> 
>> P.P.S. Should I have used Stack Overflow?
>> 
>>   Shannon (shifl...@virginia.edu)
>>   http://www.facebook.com/uvapress
>>   http://www.twitter.com/uvapress
>> 
>> ___
>> 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
> ___
> 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] Modifying an existing option in Application Builder

2011-09-06 Thread Shannon
Thanks for the help, Colleen. Let's see, I would like a page-length of 20 
instead of the default 10. I could make notes on what to change after 
redeploying, but that would be undesirable (could grow to be impractical). One 
solution would be to add more options to the UI :-) Until then, I'm happy to 
apply any clever workaround you may come up with. Thanks!

On Sep 3, 2011, at 6:10 PM, Colleen Whitney wrote:

> Shannon, I don't think there's a way to override specific options in 4.2.  
> Are you willing to share an example of an option you're trying to override 
> but can't?  We might be able to figure out a clever way around it.
> 
> Thanks,
> 
> --Colleen
> 
> From: general-boun...@developer.marklogic.com 
> [general-boun...@developer.marklogic.com] On Behalf Of Shannon 
> [shifl...@virginia.edu]
> Sent: Friday, September 02, 2011 12:04 PM
> To: General MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] Modifying an existing option in Application  
>   Builder
> 
> Hi,
> 
> Section 4.3.7.2 describes the practice of copying the entire options node 
> from config.xqy and pasting into $OPTIONS in appfunctions.xqy when there is a 
> need to override the property of an existing options node (as opposed to 
> appending a new one using $ADDITIONAL-OPTIONS). The design pattern works, but 
> when you make a change to the app that affects options and redeploy, an 
> outdated options node will persist, the updates to options will not be in 
> effect. How can I modify an existing option without breaking the design 
> pattern that permits redeployment?
> 
> Best,
> Shannon
> 
> P.S. There's an AppBuilder code comment declaring version 1.0. Is that the 
> official version number?
> 
> P.P.S. Should I have used Stack Overflow?
> 
>Shannon (shifl...@virginia.edu)
>http://www.facebook.com/uvapress
>http://www.twitter.com/uvapress
> 
> ___
> 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


[MarkLogic Dev General] Modifying an existing option in Application Builder

2011-09-02 Thread Shannon
Hi,

Section 4.3.7.2 describes the practice of copying the entire options node from 
config.xqy and pasting into $OPTIONS in appfunctions.xqy when there is a need 
to override the property of an existing options node (as opposed to appending a 
new one using $ADDITIONAL-OPTIONS). The design pattern works, but when you make 
a change to the app that affects options and redeploy, an outdated options node 
will persist, the updates to options will not be in effect. How can I modify an 
existing option without breaking the design pattern that permits redeployment?

Best,
Shannon

P.S. There's an AppBuilder code comment declaring version 1.0. Is that the 
official version number?

P.P.S. Should I have used Stack Overflow?

    Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

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


[MarkLogic Dev General] MarkLogic for Mac

2011-08-23 Thread Shannon
Macheads, a tip and a question:

I wanted to add MarkLogic log files to Console.app. They're not stored in 
~/Library/Logs, where they would be picked up automatically, so I created a 
symbolic link:

cd ~/Library/Logs
ln -s /Users/Shannon/Library/"Application Support"/MarkLogic/Data/Logs MarkLogic

Now MarkLogic appears in the sidebar of the log viewing app.

In one of my MarkLogic instances on Mac, errorlog.txt is missing from the Logs 
tab in admin console and isn't to be found in 
/Users/Shannon/Library/Application Support/MarkLogic/Data/Logs although in the 
other installation of MarkLogic on a different Mac, errorlog is showing up 
where it's expected. Was wondering if anybody has a clue what's going on here.

Best,

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

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


Re: [MarkLogic Dev General] Search API schema

2011-08-12 Thread Shannon
Micah, this is even better than I imagined, your design way exceeds my 
requirements, it will be very useful--and thanks for the explanation about the 
schema design.

On Aug 12, 2011, at 2:48 PM, Micah Dubinko wrote:

> Shannon,
> 
> The @apply attribute anywhere in Search API indicates that you can point it 
> at any desired function (with corresponding @ns and @at) to produce whatever 
> query you want for the empty case. The value of @apply can be any function 
> local-name, but a few built-in ones are special.
> 
> W3C XML Schema does not handle open enumerations gracefully, so the schema 
> needs to be more open.
> 
> -m
> 
> On Aug 12, 2011, at 11:42 AM, Shannon wrote:
> 
>> Hello,
>> 
>> Do you see any benefit to allowing a query string in term/empty/@apply 
>> instead of "all-results" or nothing--instead of all or nothing, the ability 
>> to default to a particular query? I would prefer to have more control over 
>> what results are displayed.
>> 
>> On a related note, I notice that the search.xsd schema doesn't specify an 
>> enumeration for this attribute, and often the API reference provides 
>> examples but not a comprehensive list of values--have you considered 
>> expanding the design to include these constraints to assist developers?
>> 
>> Best,
>> 
>>  Shannon (shifl...@virginia.edu)
>>  http://www.facebook.com/uvapress
>>  http://www.twitter.com/uvapress
>> 
>> ___
>> 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


[MarkLogic Dev General] Search API schema

2011-08-12 Thread Shannon
Hello,

Do you see any benefit to allowing a query string in term/empty/@apply instead 
of "all-results" or nothing--instead of all or nothing, the ability to default 
to a particular query? I would prefer to have more control over what results 
are displayed.

On a related note, I notice that the search.xsd schema doesn't specify an 
enumeration for this attribute, and often the API reference provides examples 
but not a comprehensive list of values--have you considered expanding the 
design to include these constraints to assist developers?

Best,

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

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


[MarkLogic Dev General] cts:directory-query/search:search

2011-07-28 Thread Shannon
Hi,

Is there cts:directory-query support in Search API? 

Best,

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

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


[MarkLogic Dev General] Reordering buckets

2011-05-26 Thread Shannon
Hi,

Is there a way to reorder buckets in AppBuilder? Have a few, added another, and 
would like to change the order without rebuilding those settings.

Best,

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

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


Re: [MarkLogic Dev General] xdmp:plan

2011-04-13 Thread Shannon
Correct. Thanks, Colleen. I thought of that yesterday and specified the 
namespace but didn't have success, so I must've done something wrong then, 
because it works now. Thanks again.

    Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

On Apr 13, 2011, at 11:49 AM, Colleen Whitney wrote:

> Shannon, I suspect that it could be because you're wildcarding namespaces on 
> your element path steps, rather than specifying a namespace.  
> 
> Colleen Whitney
> MarkLogic Corporation
> 
> Phone +1 650 655 2366
> email  colleen.whit...@marklogic.com
> webwww.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 
> [general-boun...@developer.marklogic.com] On Behalf Of Shannon 
> [shifl...@virginia.edu]
> Sent: Wednesday, April 13, 2011 8:45 AM
> To: General MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] xdmp:plan
> 
> Reading Jason Hunter's illuminating white paper "Inside MarkLogic 
> Server"--using xdmp:plan for the first time, and given this XPath:
> 
> collection()/*:group/*:product/*:title/*:b203[. = "Parlor Politics"]
> 
> I am expecting that the element-value index would be used, but this is output 
> from xdmp:plan:
> 
> [...]
>  Step 1 is searchable: fn:collection()
>  Step 2 does not use indexes: *:group
>  Step 3 does not use indexes: *:product
>  Step 4 does not use indexes: *:title
>  Step 5 does not use indexes: *:b203[. = "Parlor 
> Politics"]
> [...]
> 
> The word positions index is enabled.
> 
> Seeking to be enlightened as to what I may be doing wrong, thanks,
> 
>Shannon (shifl...@virginia.edu)
>http://www.facebook.com/uvapress
>http://www.twitter.com/uvapress
> 
> ___
> 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


[MarkLogic Dev General] xdmp:plan

2011-04-13 Thread Shannon
Reading Jason Hunter's illuminating white paper "Inside MarkLogic 
Server"--using xdmp:plan for the first time, and given this XPath:

collection()/*:group/*:product/*:title/*:b203[. = "Parlor Politics"]

I am expecting that the element-value index would be used, but this is output 
from xdmp:plan:

[...]
  Step 1 is searchable: fn:collection()
  Step 2 does not use indexes: *:group
  Step 3 does not use indexes: *:product
  Step 4 does not use indexes: *:title
  Step 5 does not use indexes: *:b203[. = "Parlor 
Politics"]
[...]

The word positions index is enabled.

Seeking to be enlightened as to what I may be doing wrong, thanks,

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

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


Re: [MarkLogic Dev General] Ignore inline style tags while search

2011-04-12 Thread Shannon
Abhishek, usually I e-mail MarkLogic Support. Best,

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

On Apr 12, 2011, at 12:57 AM, Abhishek53 S wrote:

> 
> No Mike ! please let me know the URL as well as process to add RFE. 
> 
> Thanks & Regards 
> Abhishek 
> 
> 
> From: Darin McBeath 
> To:   General MarkLogic Developer Discussion 
> Date: 04/12/2011 05:26 AM
> Subject:  Re: [MarkLogic Dev General] Ignore inline style tags while 
> search
> Sent by:  general-boun...@developer.marklogic.com
> 
> 
> 
> 
> The RFE process wrt MarkLogic has always been something I have failed to 
> understand.  The process has historically (from my perspective) been to meet 
> with individual customers but never to my knowledge have there been meetings 
> where entire groups of customers have been collectively involved to 
> prioritize the community needs.  I personally believe these types of 
> interactions could be very valuable (for MarkLogic and their customers).  
> Other frequent requests I have heard over the years (from other customers via 
> informal discussions) have been to allow full xpath expressions (instead of a 
> single qname) when defining indexes, fragmentation policies etc.  I'm sure 
> other customers could list representative examples as well.  However, these 
> requests never seem to make the final cut (for possibly very valid reasons).  
> It would seem that the upcoming user conference might be a good opportunity 
> to possibly begin experimenting with the idea of collectively working 
> together with the user community to define the next set of features. 
> 
> Darin. 
> 
> From: Michael Sokolov 
> To: General MarkLogic Developer Discussion 
> Cc: Shannon 
> Sent: Mon, April 11, 2011 6:32:14 PM
> Subject: Re: [MarkLogic Dev General] Ignore inline style tags while search
> 
> +1 to the cause here - we see this problem occasionally, too.  Do you have a 
> URL to submit an RFE?
> 
> -Mike
> 
> On 4/11/2011 1:52 PM, Shannon wrote: 
> Abhishek, submitting an RFE would help the cause :-) 
> 
> On Apr 11, 2011, at 1:38 PM, Abhishek53 S wrote: 
> 
> Hi Shannon/Danny
>  Thanks for reply. I guess there is no way except to place the duplicate 
> entry into my searchable content. Currently I am using 4.2 version of 
> Marklogic. I guess the word-through /phrase-through features will be 
> supported in future versions of Marklogic. 
> Correct me If I am wrong! 
>   
> Thanks and Regards 
> Abhishek Srivastav
> Assistant Systems Engineer
> Tata Consultancy Services
> Plot  B-1, Block EP & GP, Sector 5
> Salt Lake Electronics Complex,
> Kolkata - 700 091,West Bengal
> India
> Cell:- +91-9883389968
> Mailto: abhishek5...@tcs.com
> Website: http://www.tcs.com/
> 
> Experience certainty. IT Services
> Business Solutions
> Outsourcing
>  
> 
> -general-boun...@developer.marklogic.com wrote: -
> 
> To: General MarkLogic Developer Discussion 
> From: Danny Sokolsky 
> Sent by: general-boun...@developer.marklogic.com
> Date: 04/11/2011 09:46PM
> Subject: Re: [MarkLogic Dev General] Ignore inline style tags while search
> 
> Hi Shannon,
> 
>   
> I can’t really comment on the odds.  But it is not a super easy thing to do.
> 
>   
> -Danny
> 
>   
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
> Sent: Monday, April 11, 2011 9:09 AM
> To: General MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Ignore inline style tags while search
> 
>   
> Hey Danny, what are the odds we'll see a "word-through" feature in a future 
> release? We have an RFE in on this, and this is a fairly frequent use case.
> 
>   
>   Shannon (shifl...@virginia.edu) 
>http://www.facebook.com/uvapress 
>http://www.twitter.com/uvapress
> 
>   
> On Apr 11, 2011, at 12:05 PM, Danny Sokolsky wrote:
> 
> 
> 
> Hi Abhishek, 
>   
> When that is tokenized, it is tokenized as two terms, not one (because tokens 
> cannot cross an element boundary).  That is why the phrase-through approach 
> does not work.  The way I have heard of people dealing with this is to 
> pre-process their content, transforming that to be one term.  Something like 
> turning this: 
>   
> Repository 
>   
> Into 
>   
> Repository 
>   
> The idea here is to have the attributes contain enough information for the 
> application to style t

Re: [MarkLogic Dev General] Ignore inline style tags while search

2011-04-11 Thread Shannon
Abhishek, submitting an RFE would help the cause :-)

On Apr 11, 2011, at 1:38 PM, Abhishek53 S wrote:

> Hi Shannon/Danny
>  Thanks for reply. I guess there is no way except to place the duplicate 
> entry into my searchable content. Currently I am using 4.2 version of 
> Marklogic. I guess the word-through /phrase-through features will be 
> supported in future versions of Marklogic.
> 
> Correct me If I am wrong!
>  
> Thanks and Regards
> Abhishek Srivastav
> Assistant Systems Engineer
> Tata Consultancy Services
> Plot  B-1, Block EP & GP, Sector 5
> Salt Lake Electronics Complex,
> Kolkata - 700 091,West Bengal
> India
> Cell:- +91-9883389968
> Mailto: abhishek5...@tcs.com
> Website: http://www.tcs.com
> 
> Experience certainty. IT Services
> Business Solutions
> Outsourcing
> 
> 
> -general-boun...@developer.marklogic.com wrote: -
> 
> To: General MarkLogic Developer Discussion 
> From: Danny Sokolsky 
> Sent by: general-boun...@developer.marklogic.com
> Date: 04/11/2011 09:46PM
> Subject: Re: [MarkLogic Dev General] Ignore inline style tags while search
> 
> Hi Shannon,
> 
>  
> 
> I can’t really comment on the odds.  But it is not a super easy thing to do.
> 
>  
> 
> -Danny
> 
>  
> 
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
> Sent: Monday, April 11, 2011 9:09 AM
> To: General MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Ignore inline style tags while search
> 
>  
> 
> Hey Danny, what are the odds we'll see a "word-through" feature in a future 
> release? We have an RFE in on this, and this is a fairly frequent use case.
> 
>  
> 
>   Shannon (shifl...@virginia.edu)
> 
>http://www.facebook.com/uvapress
> 
>http://www.twitter.com/uvapress
> 
>  
> 
> On Apr 11, 2011, at 12:05 PM, Danny Sokolsky wrote:
> 
> 
> 
> 
> Hi Abhishek,
> 
>  
> 
> When that is tokenized, it is tokenized as two terms, not one (because tokens 
> cannot cross an element boundary).  That is why the phrase-through approach 
> does not work.  The way I have heard of people dealing with this is to 
> pre-process their content, transforming that to be one term.  Something like 
> turning this:
> 
>  
> 
> Repository
> 
>  
> 
> Into
> 
>  
> 
> Repository
> 
>  
> 
> The idea here is to have the attributes contain enough information for the 
> application to style the text appropriately.  To make this work for all 
> cases, it is fairly tricky.  Alternately, you can put the word token in an 
> attribute, but then you will have to explicitly search for it. 
> 
>  
> 
> Repository
> 
>  
> 
> It depends on your app which will be easier/better.   The second way allows 
> you to deal with multiple mark-up items in a word easier.
> 
>  
> 
> -Danny
> 
>  
> 
>  
> 
>  
> 
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Abhishek53 S
> Sent: Monday, April 11, 2011 8:00 AM
> To: General MarkLogic Developer Discussion
> Cc: General MarkLogic Developer Discussion; 
> general-boun...@developer.marklogic.com
> Subject: Re: [MarkLogic Dev General] Ignore inline style tags while search
> 
>  
> 
> 
> Dear Geert 
> 
> Thanks for your reply ! Yes the phrase through has already include the 
> element b,I,i without any namespace. But still the result is matching for the 
> search term 
> 
> Thanks & Regards 
> 
> Abhishek Srivastav
> Assistant Systems Engineer
> Tata Consultancy Services
> Plot  B-1, Block EP & GP, Sector 5
> Salt Lake Electronics Complex,
> Kolkata - 700 091,West Bengal
> India
> Cell:- +91-9883389968
> Mailto: abhishek5...@tcs.com
> Website: http://www.tcs.com
> 
> Experience certainty.IT Services
>Business Solutions
>Outsourcing
>  
> 
> 
> 
> From:
> 
> Geert Josten 
> 
> To:
> 
> General MarkLogic Developer Discussion 
> 
> Date:
> 
> 04/11/2011 08:12 PM
> 
> Subject:
> 
> Re: [MarkLogic Dev General] Ignore inline style tags while search
> 
> Sent by:
> 
> general-boun...@developer.marklogic.com
> 
>  
> 
> 
> 
> 
> Hi Abhishek, 
>   
> Have you tried configuring these element as ‘Phrase-throughs’? You can f

Re: [MarkLogic Dev General] Ignore inline style tags while search

2011-04-11 Thread Shannon
Hey Danny, what are the odds we'll see a "word-through" feature in a future 
release? We have an RFE in on this, and this is a fairly frequent use case.

Shannon (shifl...@virginia.edu)
http://www.facebook.com/uvapress
http://www.twitter.com/uvapress

On Apr 11, 2011, at 12:05 PM, Danny Sokolsky wrote:

> Hi Abhishek,
>  
> When that is tokenized, it is tokenized as two terms, not one (because tokens 
> cannot cross an element boundary).  That is why the phrase-through approach 
> does not work.  The way I have heard of people dealing with this is to 
> pre-process their content, transforming that to be one term.  Something like 
> turning this:
>  
> Repository
>  
> Into
>  
> Repository
>  
> The idea here is to have the attributes contain enough information for the 
> application to style the text appropriately.  To make this work for all 
> cases, it is fairly tricky.  Alternately, you can put the word token in an 
> attribute, but then you will have to explicitly search for it. 
>  
> Repository
>  
> It depends on your app which will be easier/better.   The second way allows 
> you to deal with multiple mark-up items in a word easier.
>  
> -Danny
>  
>  
>  
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Abhishek53 S
> Sent: Monday, April 11, 2011 8:00 AM
> To: General MarkLogic Developer Discussion
> Cc: General MarkLogic Developer Discussion; 
> general-boun...@developer.marklogic.com
> Subject: Re: [MarkLogic Dev General] Ignore inline style tags while search
>  
> 
> Dear Geert 
> 
> Thanks for your reply ! Yes the phrase through has already include the 
> element b,I,i without any namespace. But still the result is matching for the 
> search term 
> 
> Thanks & Regards 
> 
> Abhishek Srivastav
> Assistant Systems Engineer
> Tata Consultancy Services
> Plot  B-1, Block EP & GP, Sector 5
> Salt Lake Electronics Complex,
> Kolkata - 700 091,West Bengal
> India
> Cell:- +91-9883389968
> Mailto: abhishek5...@tcs.com
> Website: http://www.tcs.com
> 
> Experience certainty.IT Services
>Business Solutions
>Outsourcing
>  
> 
> 
> From:
> Geert Josten 
> To:
> General MarkLogic Developer Discussion 
> Date:
> 04/11/2011 08:12 PM
> Subject:
> Re: [MarkLogic Dev General] Ignore inline style tags while search
> Sent by:
> general-boun...@developer.marklogic.com
>  
> 
> 
> 
> Hi Abhishek, 
>   
> Have you tried configuring these element as ‘Phrase-throughs’? You can find 
> that in the database configuration in the Admin console. 
>   
> Kind regards, 
> Geert 
>   
> Van: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] Namens Abhishek53 S
> Verzonden: maandag 11 april 2011 16:37
> Aan: general@developer.marklogic.com
> Onderwerp: [MarkLogic Dev General] Ignore inline style tags while search 
>  
> Dear All
> 
> I want to ignore the inline markup style tags like  and  during my word 
> search Like I have my content as
> 
> Marklogic Repository 
> 
> I am using search:search API and sending the search term as "Repository".This 
> is not returning me any result
> 
> Please let me know how to achieve
> 
> Thanks in advance ! 
> 
> Abhishek Srivastav
> Assistant Systems Engineer
> Tata Consultancy Services
> Plot  B-1, Block EP & GP, Sector 5
> Salt Lake Electronics Complex,
> Kolkata - 700 091,West Bengal
> India
> Cell:- +91-9883389968
> Mailto: abhishek5...@tcs.com
> Website: http://www.tcs.com
> 
> Experience certainty.IT Services
>   Business Solutions
>   Outsourcing
>  
> =-=-=
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> ___
> General mailing list
> General@developer.marklogic.com

Re: [MarkLogic Dev General] MarkLogic Server for Mac

2011-02-01 Thread Shannon
Thank you, both. Time to time I access the instance on my workstation remotely 
and sometimes the power goes out on a weekend or something. Will be able to 
solve this problem now. Appreciated,
Shannon

On Feb 1, 2011, at 12:41 PM, Michael Blakeley wrote:

> 
> On 1 Feb 2011, at 09:38 , Walter Underwood wrote:
> 
>> On Feb 1, 2011, at 11:17 AM, Shannon wrote:
>> 
>>> Hi,
>>> 
>>> Is there a way to make the (Mac dev-only) server start up automatically 
>>> after a reboot without logging in? It would be helpful in cases of power 
>>> outage.
>>> 
>>> Thanks,
>>> Shannon
>> 
>> I haven't tried that, so I have no idea whether it would work. You'll find a 
>> script in ~/StartupItems/MarkLogic that can be used to start and stop the 
>> server. It might be possible to hook that in to the Mac restart logic, but 
>> I'm not familiar with that part of the OS.
>> 
>> These commands will start and stop the server. This is what the preference 
>> pane uses:
>> 
>> ~/Library/StartupItems/MarkLogic/MarkLogic start
>> ~/Library/StartupItems/MarkLogic/MarkLogic stop
>> 
>> The Mac OS X release is intended for development use, so it is only tested 
>> with a logged-in user.
> 
> I'll add a link to the privoxy example at 
> http://hints.macworld.com/article.php?story=20100227045756617 in case it 
> helps. That provides a sample /Library/LaunchDaemons plist for launchd to 
> use, which you could modify as outlined by Walter. You can probably ignore 
> all the user and group setup.
> 
> -- Mike
> ___
> 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] MarkLogic Server for Mac

2011-02-01 Thread Shannon
Extremely helpful, gives me a direction, thank you.

On Feb 1, 2011, at 12:38 PM, Walter Underwood wrote:

> On Feb 1, 2011, at 11:17 AM, Shannon wrote:
> 
>> Hi,
>> 
>> Is there a way to make the (Mac dev-only) server start up automatically 
>> after a reboot without logging in? It would be helpful in cases of power 
>> outage.
>> 
>> Thanks,
>> Shannon
> 
> I haven't tried that, so I have no idea whether it would work. You'll find a 
> script in ~/StartupItems/MarkLogic that can be used to start and stop the 
> server. It might be possible to hook that in to the Mac restart logic, but 
> I'm not familiar with that part of the OS.
> 
> These commands will start and stop the server. This is what the preference 
> pane uses:
> 
> ~/Library/StartupItems/MarkLogic/MarkLogic start
> ~/Library/StartupItems/MarkLogic/MarkLogic stop
> 
> The Mac OS X release is intended for development use, so it is only tested 
> with a logged-in user.
> 
> wunder
> --
> Walter Underwood
> Lead Engineer
> walter.underw...@marklogic.com
> 
> 
> 
> ___
> 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


[MarkLogic Dev General] MarkLogic Server for Mac

2011-02-01 Thread Shannon
Hi,

Is there a way to make the (Mac dev-only) server start up automatically after a 
reboot without logging in? It would be helpful in cases of power outage.

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


[MarkLogic Dev General] AppBuilder skins

2011-01-13 Thread Shannon
Hey, it appears that even in 4.2 custom skins added to /application/skins are 
lost when the application is redeployed. Do you have a recommended design 
pattern for creating and maintaining new themes? I understand how 
/custom/appcss.css relates to /application/css, just not clear on how 
/application/skins fits into the picture. Thanks,

Shannon (shifl...@virginia.edu)




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


Re: [MarkLogic Dev General] Support messages

2011-01-04 Thread Shannon
You're right, that explains it. Very good, glad there is no problem, wanted to 
alert if there was an issue you weren't aware about. Thanks Jason!

On Jan 4, 2011, at 7:42 PM, Jason Hunter wrote:

> Actually, we just cleaned out this list's moderation queue.  A few old 
> messages have been stalled there due to being above the size limit.  We 
> increased the size limit (to 350K) and fixed the moderation notification 
> system so we'll know when messages are caught.
> 
> My guess is you may have also sent a version of the mails to support@, but 
> these were definitely to the general@ list.
> 
> -jh-
> 
> On Jan 4, 2011, at 4:15 PM, Shannon wrote:
> 
>> Not sure if my e-mail client is being glitchy or I am misreading the 
>> headers, but did a couple messages from Alex and myself, originally intended 
>> for Support, accidentally get sent to the discussion list? Thought I should 
>> ask, just in case, so something terribly proprietary doesn't make its way 
>> out.
>> 
>> Thanks,
>> Shannon
>> ___
>> 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


[MarkLogic Dev General] Support messages

2011-01-04 Thread Shannon
Not sure if my e-mail client is being glitchy or I am misreading the headers, 
but did a couple messages from Alex and myself, originally intended for 
Support, accidentally get sent to the discussion list? Thought I should ask, 
just in case, so something terribly proprietary doesn't make its way out.

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


Re: [MarkLogic Dev General] db:fields

2010-10-26 Thread Shannon
Mary, this is helpful in multiple ways, answered all my questions, thanks a lot!

On Oct 26, 2010, at 8:47 AM, Mary Holstege wrote:

> 
> The DB index options follow the schema Config/databases.xsd but are
> not looking at your database settings unless you have the use-db-config
> option set to true (in which case all the fields will automatically
> be used).  If you want a field just for distinctive-terms, then
> the full field set up needs to be in the options node, e.g.
> 
> 
>  http://marklogic.com/xdmp/database";>
>   Sources
>   false
>   
> http://marklogic.com/collation/en/S1
>   
>   
> 
>   
>   SOUR
>   1.0
>   
>   
>   
> 
>   
>   
> 
>   
>   REPO NOTE DATA
> 
>   
>  
> 
> //Mary
> 
> 
> On Mon, 25 Oct 2010 20:14:10 -0700, Shannon  wrote:
> 
>> Hi,
>> 
>> I get the error, "Invalid options node: /*:options/*:fields" when I try the 
>> following query:
>> 
>> cts:distinctive-terms(
>>  doc("/product-0813925045.xml"),
>>  > xmlns:db="http://marklogic.com/xdmp/database";>
>>  true
>>  
>> )
>> 
>> The API reference doesn't provide an example…. This is a somewhat general 
>> problem I tend to run into when configuring options nodes, such as for 
>> search:search--more documentation in this area would be great!
>> 
>> I've tried several variations, such as > name="like-titles" collation="http://marklogic.com/collation/en/S1/CU/MO"; 
>> />
>> 
>> Probably I'm using it incorrectly. Can I specify the field I want to use? 
>> That is what I'm aiming for. Or should I use an XPath union to narrow the 
>> path from which terms are extracted?
>> 
>> Thanks!
>> ___
>> General mailing list
>> General@developer.marklogic.com
>> http://developer.marklogic.com/mailman/listinfo/general
> 
> 
> -- 
> Using Opera's revolutionary email client: http://www.opera.com/mail/

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


[MarkLogic Dev General] db:fields

2010-10-25 Thread Shannon
Hi,

I get the error, "Invalid options node: /*:options/*:fields" when I try the 
following query:

cts:distinctive-terms(
doc("/product-0813925045.xml"),
http://marklogic.com/xdmp/database";>
true

)

The API reference doesn't provide an example…. This is a somewhat general 
problem I tend to run into when configuring options nodes, such as for 
search:search--more documentation in this area would be great!

I've tried several variations, such as http://marklogic.com/collation/en/S1/CU/MO"; />

Probably I'm using it incorrectly. Can I specify the field I want to use? That 
is what I'm aiming for. Or should I use an XPath union to narrow the path from 
which terms are extracted?

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


Re: [MarkLogic Dev General] Information Studio Transform

2010-10-25 Thread Shannon
Colleen, thank you for this informative response. I'm afraid the Fab database 
(great name) is empty. I would like to send you the stylesheet and a truncated 
TEI corpus "offline". Splitting is not the only preprocessing step, 
unfortunately, but I'd be happy to check out Justin's custom Collector for 
up-front splitting, if you think that's the best approach. Thanks very much!

On Oct 24, 2010, at 1:55 PM, Colleen Whitney wrote:

> Hi Shannon,
> 
> Here's a little background to help track down what might be happening. 
> 
> Information Studio uses the Content Processing Framework (CPF) and a 
> dedicated "Fab" database under the covers to do transformations.  If you have 
> transformations configured, the documents that your collector ingests go into 
> the Fab database in a particular directory corresponding with the CPF 
> processing domain for your Flow. Information Studio creates a pipeline for 
> you and attaches it to the domain, including a final step that inserts the 
> document into your destination database.  (If you don't have transformations 
> configured, the documents go straight into your destination database without 
> going through Fab.)
> 
> In the pipeline, Information Studio uses a generic XSLT CPF handler that was 
> added as part of XSLT support, and frankly I'm not sure how it handles cases 
> where there are multiple output documents.  Take a look at your Fab database. 
>  Are the documents you expected sitting in there?  What do the URIs look 
> like?  One possibility is that the documents are in Fab, have been assigned 
> URIs outside of the processing domain, so they're not being picked up by CPF 
> and moved through the pipeline and into your target database.  If the 
> documents are not in Fab, then we need to back up and understand what that 
> generic handler is doing with the output documents (so yes, a stylesheet and 
> simple input document would be really helpful).
> 
> That said, for this release Flows are optimized for single-document-in, 
> single-document-out, linear pipelines.  Document splitting is a common 
> scenario, and there are a couple of other approaches you could try.  One that 
> I like is to write a custom Collector that does the document splitting up 
> front, before the documents are inserted.  There's a nice example posted to 
> github by Justin Makeig along with his intro video (see the video and the 
> link to the github project at 
> http://developer.marklogic.com/blog/information-studio-intro-video). 
> 
> If splitting is your only processing step, this has an advantage in that the 
> documents don't need to go through Fab, which is much faster.  And if what 
> you're doing is generic, then it's particularly nice because you can reuse 
> that Collector in many flows, without having to add the transformation step 
> each time.
> 
> --Colleen
> 
> Colleen Whitney
> MarkLogic Corporation
> 
> Phone +1 650 655 2366
> email  colleen.whit...@marklogic.com
> webwww.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 
> [general-boun...@developer.marklogic.com] On Behalf Of Shannon 
> [shifl...@virginia.edu]
> Sent: Friday, October 22, 2010 8:44 AM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] Information Studio Transform
> 
> Hi MarkLogic,
> 
> For a Transformation Step in an InfoStudio Flow, I've inserted a stylesheet 
> as an XSLT Transform, which basically splits a TEI corpus into individual XML 
> documents, and constructs some metadata in a certain namespace for indexing 
> purposes (I can post the thing if that would help)--it works in Oxygen with 
> Saxon-PE 9.2.0.6 as the specified transformer; however, it effectively does 
> nothing as part of the flow editor--only 1 document is reported as loaded, 
> and the split TEI docs don't appear in the database.
> 
> Thanks in advance for your help, I'm really looking forward to finding out 
> what I'm doing wrong--moving ahead, thanks to 4.2, content loading with a 
> persistent flow including a preprocessing transform step will really help cut 
> down on the number of steps in my workflow, naturally.
> 
>

[MarkLogic Dev General] cts:similar-query

2010-10-24 Thread Shannon
I'm afraid I can't spot what's wrong here…. Thanks.

let $options := 
   
  5

return
cts:search(
collection(), 
cts:similar-query(
collection()[1],
$options
)
)//a001

=>

XDMP-NONMIXEDCOMPLEXCONT: fn:data(5) -- Node has 
complex type with non-mixed complex content

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


[MarkLogic Dev General] Information Studio Transform

2010-10-22 Thread Shannon
Hi MarkLogic,

For a Transformation Step in an InfoStudio Flow, I've inserted a stylesheet as 
an XSLT Transform, which basically splits a TEI corpus into individual XML 
documents, and constructs some metadata in a certain namespace for indexing 
purposes (I can post the thing if that would help)--it works in Oxygen with 
Saxon-PE 9.2.0.6 as the specified transformer; however, it effectively does 
nothing as part of the flow editor--only 1 document is reported as loaded, and 
the split TEI docs don't appear in the database.

Thanks in advance for your help, I'm really looking forward to finding out what 
I'm doing wrong--moving ahead, thanks to 4.2, content loading with a persistent 
flow including a preprocessing transform step will really help cut down on the 
number of steps in my workflow, naturally.

This is with MarkLogic Server, Standard Edition, Personal License, OS X 
Dev-only, as we haven't yet upgraded our Red Hat Enterprise servers to 4.2.

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


Re: [MarkLogic Dev General] normalizing xml (nested nodes) to string

2010-10-20 Thread Shannon
o/c the example i gave is going to complain about the arg type--just 
curious whether //text() might help in your case somehow, whether you've 
tried it.

On 10/20/10 12:48 PM, DJaun Maclin wrote:
> Hello everyone,
>
> I’m running into a problem that I’m having a brain freeze on, and I
> could use some help thinking through this one:
>
> How can I display the text in its original form when dealing with nested
> nodes?
>
> Some Background: These results are shown as results in a search engine
> which are shown to the users.
>
> XML node from /kn:object/kn:content/kn:page:
>
>  minorType="company"> gate:gateId="2542">JBS are the  gate:gateId="2543">initials of a  majorType="country_adj"> gate:gateId="2544">Brazilian gate:gateId="2545">man in a  gate:gateId="2546">hurry.  majorType="organisation" minorType="company"> rule="Preprocess5"> gate:gateId="2547">JBS, the  gate:gateId="1985" majorType="tags"
> minorType="topPoultryAndSwineCompaniesTags">company, sprang
> from obscurity to become the world s largest  majorType="tags" minorType="foodTags"> majorType="indust" minorType="foodIndust"> majorType="indust"
> minorType="meatIndust">meat gate:gateId="1989" majorType="tags"
> minorType="topPoultryAndSwineCompaniesTags">company in just the
>  rule2="DateOnlyFinal"> majorType="time_modifier">last majorType="time" minorType="hour"> majorType="number">five majorType="date_unit">years.
>
> The xquery used:
>
> fn:normalize-space(data(doc()[1]/kn:object/kn:content//kn:page))
>
> The sentence generated:
>
> “JBS are the initials of a Brazilianman in a hurry. JBS, the company,
> sprang from obscurity to become the world s largest meatcompany in just
> the lastfiveyears.”
>
> The sentence should be:
>
> “JBS are the initials of a Brazilian man in a hurry. JBS, the company,
> sprang from obscurity to become the world s largest meat company in just
> the last five years.”
>
> The spaces seem not to be respected in a nested node in the case of
> further enrichment on a node, and I’m trying to find the best way to
> approach this problem.
>
> We are using java to enrich this document inside the marklogic system
> too, so we are willing to use any tools that could help in this area
> (JAXP,etc)
>
> How can I achieve the above sentence in the way that I want when nested
> nodes are involved and spaces are not kept?
>
> How can I enforce spaces on nodes inside of nested nodes?
>
> I’ve tried adding a space after the opening tag and before the enriched
> words ( JBS), but that messed up the element ranges
> in the Marklogic database (extra spaces made it hard to find values upon
> exact matches).
>
> Any ideas are appreciated!
>
> Thanks
>
> Dj
>
>
>
> ___
> 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] normalizing xml (nested nodes) to string

2010-10-20 Thread Shannon
Hello,

Have you tried

fn:normalize-space(data(doc()[1]/kn:object/kn:content//kn:page//text()))

? Depends on whether you want to preserve mixed content for 
styling/rendering.

On 10/20/10 12:48 PM, DJaun Maclin wrote:
> Hello everyone,
>
> I’m running into a problem that I’m having a brain freeze on, and I
> could use some help thinking through this one:
>
> How can I display the text in its original form when dealing with nested
> nodes?
>
> Some Background: These results are shown as results in a search engine
> which are shown to the users.
>
> XML node from /kn:object/kn:content/kn:page:
>
>  minorType="company"> gate:gateId="2542">JBS are the  gate:gateId="2543">initials of a  majorType="country_adj"> gate:gateId="2544">Brazilian gate:gateId="2545">man in a  gate:gateId="2546">hurry.  majorType="organisation" minorType="company"> rule="Preprocess5"> gate:gateId="2547">JBS, the  gate:gateId="1985" majorType="tags"
> minorType="topPoultryAndSwineCompaniesTags">company, sprang
> from obscurity to become the world s largest  majorType="tags" minorType="foodTags"> majorType="indust" minorType="foodIndust"> majorType="indust"
> minorType="meatIndust">meat gate:gateId="1989" majorType="tags"
> minorType="topPoultryAndSwineCompaniesTags">company in just the
>  rule2="DateOnlyFinal"> majorType="time_modifier">last majorType="time" minorType="hour"> majorType="number">five majorType="date_unit">years.
>
> The xquery used:
>
> fn:normalize-space(data(doc()[1]/kn:object/kn:content//kn:page))
>
> The sentence generated:
>
> “JBS are the initials of a Brazilianman in a hurry. JBS, the company,
> sprang from obscurity to become the world s largest meatcompany in just
> the lastfiveyears.”
>
> The sentence should be:
>
> “JBS are the initials of a Brazilian man in a hurry. JBS, the company,
> sprang from obscurity to become the world s largest meat company in just
> the last five years.”
>
> The spaces seem not to be respected in a nested node in the case of
> further enrichment on a node, and I’m trying to find the best way to
> approach this problem.
>
> We are using java to enrich this document inside the marklogic system
> too, so we are willing to use any tools that could help in this area
> (JAXP,etc)
>
> How can I achieve the above sentence in the way that I want when nested
> nodes are involved and spaces are not kept?
>
> How can I enforce spaces on nodes inside of nested nodes?
>
> I’ve tried adding a space after the opening tag and before the enriched
> words ( JBS), but that messed up the element ranges
> in the Marklogic database (extra spaces made it hard to find values upon
> exact matches).
>
> Any ideas are appreciated!
>
> Thanks
>
> Dj
>
>
>
> ___
> 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] relevance by element/attribute values

2010-10-06 Thread Shannon
Hi Danny, what does a weight of 16 do effectively? I've experimented with 
boosting scores in field and word-query configurations, and it never seemed to 
affect the score enough to make any actual difference to relevance-ranked 
results. If I remember correctly, 16 was insufficient--I would have needed 100 
or 200 or more to move the rankings on title matches for example. I would love 
to learn more. Thanks.

On Oct 6, 2010, at 2:28 PM, Danny Sokolsky wrote:

> You can put weights on the cts:query constructors to affect how much a match 
> in each constructor contributes to score.  You can also change the word query 
> configuration on the database to boost the weight for a particular element 
> (like title, for example).  The word query configuration change bakes that 
> weight into the index.
> 
> To accomplish the cts:query weight boost, you might create a query that 
> combines word-query and element-word-query with an and-query of a word-query 
> and an or-query (so you keep the semantics the same as just the word-query), 
> with a weight on the element-word-query.  Something like:
> 
> cts:and-query((
>  cts:word-query($q),
>  cts:or-query((
> cts:element-word-query(xs:QName("title"), $q, (), 16) ))
>  ))
> 
> This would boost the score of matches that occur in title elements. 
> 
> For more details about relevance, see "Relevance Scores: Understanding and 
> Customizing" chapter in the Search Developer's Guide.
> 
> -Danny
> 
> -Original Message-
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Shah, Mehul 
> (LNG-NPV)
> Sent: Wednesday, October 06, 2010 9:24 AM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] relevance by element/attribute values
> 
> For a given query, is there a way to indicate field1 (title) has higher 
> weight compared to other fields (body-text) for search relevance.
> i.e.  
> Query: "New York"
> Doc1- has "New York" in  3 times 
> Doc2- has "New York" in  once
> (where  or  may have more elements within it.)
> 
> How do I do search:search to get result in such order that Doc-2 appears 
> first (even though it has less hits for the query terms).
> 
> 
> Thanks.
> ___
> 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] Facet results

2010-09-20 Thread Shannon
Hi Mano,

You might find Justin's response to a similar question from 8/24 useful:

http://markmail.org/message/or6eqxbqlyvr4jd6

Best,
Shannon

On Sep 20, 2010, at 10:06 AM, mano m wrote:

> Hi,
> 
> Please suggest your opinion for the following questions :
> 
> 1. How do we get facets from cts:search() results.I tried with using 
> cts:frequency() for the cts:word-query() results.
> 
> 2. Do we need to create indexes for all the facet elements?  Or Is there any 
> way to get the facet without creating indexes?
> 
> 
> Regards,
> Mano
> 
> 
> ___
> 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


[MarkLogic Dev General] Fwd: Fwd: local:document-rename

2010-09-02 Thread Shannon
forcryingoutloud, i meant xdmp:document-rename … 

Begin forwarded message:

> From: Shannon 
> Date: September 2, 2010 1:24:58 PM EDT
> To: General Mark Logic Developer Discussion 
> Subject: [MarkLogic Dev General] Fwd: local:document-rename
> Reply-To: General Mark Logic Developer Discussion 
> 
> 
> my colleague david just informed me about a correction: i mean to ask, why is 
> there _no_ xdmp:document-delete function? 
> 
> Begin forwarded message:
> 
>> From: Shannon 
>> Date: September 2, 2010 1:18:28 PM EDT
>> To: General Mark Logic Developer Discussion 
>> Subject: [MarkLogic Dev General] local:document-rename
>> Reply-To: General Mark Logic Developer Discussion 
>> 
>> 
>> Thank you, Michael Blakeley, for posting your function:
>> 
>> declare function local:document-rename(
>> $old-uri as xs:string, $new-uri as xs:string)
>> as empty-sequence()
>> {
>>  xdmp:document-delete($old-uri)
>>  ,
>>  let $permissions := xdmp:document-get-permissions($old-uri)
>>  let $collections := xdmp:document-get-collections($old-uri)
>>  return xdmp:document-insert(
>>$new-uri, doc($old-uri),
>>if ($permissions) then $permissions
>>else xdmp:default-permissions(),
>>if ($collections) then $collections
>>else xdmp:default-collections(),
>>xdmp:document-get-quality($old-uri)
>>  )
>>  ,
>>  let $prop-ns := namespace-uri()
>>  let $properties :=
>>xdmp:document-properties($old-uri)/node()
>>  [ namespace-uri(.) ne $prop-ns ]
>>  return xdmp:document-set-properties($new-uri, $properties)
>> };
>> 
>> It helped me to reclaim some lost time when I inadvertently renamed all the 
>> documents in a modules database (warning to all: in OS X Finder, if you add 
>> a WebDAV-connected folder to the sidebar, and rename the sidebar entry, you 
>> actually end up renaming the source directory, i.e., all the documents in 
>> your database!, not the shortcut/alias, which is utterly unexpected 
>> behavior; to make matters worse, it prefixed "http://"; to the URIs which is 
>> an invalid WebDAV pathname, so the documents appeared to be *deleted* at 
>> first glance, which was pretty unsettling). 
>> 
>> So, thanks, Mike, for helping me to get my app back, and I'm curious, why is 
>> there an xdmp:document-rename?
>> 
>> Best regards,
>> Shannon
>> 
>> ___
>> 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


[MarkLogic Dev General] Fwd: local:document-rename

2010-09-02 Thread Shannon
my colleague david just informed me about a correction: i mean to ask, why is 
there _no_ xdmp:document-delete function? 

Begin forwarded message:

> From: Shannon 
> Date: September 2, 2010 1:18:28 PM EDT
> To: General Mark Logic Developer Discussion 
> Subject: [MarkLogic Dev General] local:document-rename
> Reply-To: General Mark Logic Developer Discussion 
> 
> 
> Thank you, Michael Blakeley, for posting your function:
> 
> declare function local:document-rename(
> $old-uri as xs:string, $new-uri as xs:string)
> as empty-sequence()
> {
>  xdmp:document-delete($old-uri)
>  ,
>  let $permissions := xdmp:document-get-permissions($old-uri)
>  let $collections := xdmp:document-get-collections($old-uri)
>  return xdmp:document-insert(
>$new-uri, doc($old-uri),
>if ($permissions) then $permissions
>else xdmp:default-permissions(),
>if ($collections) then $collections
>else xdmp:default-collections(),
>xdmp:document-get-quality($old-uri)
>  )
>  ,
>  let $prop-ns := namespace-uri()
>  let $properties :=
>xdmp:document-properties($old-uri)/node()
>  [ namespace-uri(.) ne $prop-ns ]
>  return xdmp:document-set-properties($new-uri, $properties)
> };
> 
> It helped me to reclaim some lost time when I inadvertently renamed all the 
> documents in a modules database (warning to all: in OS X Finder, if you add a 
> WebDAV-connected folder to the sidebar, and rename the sidebar entry, you 
> actually end up renaming the source directory, i.e., all the documents in 
> your database!, not the shortcut/alias, which is utterly unexpected behavior; 
> to make matters worse, it prefixed "http://"; to the URIs which is an invalid 
> WebDAV pathname, so the documents appeared to be *deleted* at first glance, 
> which was pretty unsettling). 
> 
> So, thanks, Mike, for helping me to get my app back, and I'm curious, why is 
> there an xdmp:document-rename?
> 
> Best regards,
> Shannon
> 
> ___
> 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


[MarkLogic Dev General] local:document-rename

2010-09-02 Thread Shannon
Thank you, Michael Blakeley, for posting your function:

declare function local:document-rename(
 $old-uri as xs:string, $new-uri as xs:string)
as empty-sequence()
{
  xdmp:document-delete($old-uri)
  ,
  let $permissions := xdmp:document-get-permissions($old-uri)
  let $collections := xdmp:document-get-collections($old-uri)
  return xdmp:document-insert(
$new-uri, doc($old-uri),
if ($permissions) then $permissions
else xdmp:default-permissions(),
if ($collections) then $collections
else xdmp:default-collections(),
xdmp:document-get-quality($old-uri)
  )
  ,
  let $prop-ns := namespace-uri()
  let $properties :=
xdmp:document-properties($old-uri)/node()
  [ namespace-uri(.) ne $prop-ns ]
  return xdmp:document-set-properties($new-uri, $properties)
};

It helped me to reclaim some lost time when I inadvertently renamed all the 
documents in a modules database (warning to all: in OS X Finder, if you add a 
WebDAV-connected folder to the sidebar, and rename the sidebar entry, you 
actually end up renaming the source directory, i.e., all the documents in your 
database!, not the shortcut/alias, which is utterly unexpected behavior; to 
make matters worse, it prefixed "http://"; to the URIs which is an invalid 
WebDAV pathname, so the documents appeared to be *deleted* at first glance, 
which was pretty unsettling). 

So, thanks, Mike, for helping me to get my app back, and I'm curious, why is 
there an xdmp:document-rename?

Best regards,
Shannon

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


Re: [MarkLogic Dev General] Phase Through Search problem

2010-08-24 Thread Shannon
The data is being tokenized on whitespace, and you're introducing whitespace. 
Wouldn't the following solve the problem?

Magnetic anisotropy data of 
C24H12

Just a guess….

On Aug 24, 2010, at 1:40 PM, Shannon wrote:

> Hi Debabarata, 
> 
> If I'm not mistaken, you want a "Word-Through" which is not currently 
> supported. MarkLogic has filed an RFE (#5849, "Enable per-database 
> word-through specifications", as well as a Word-Around) for consideration in 
> a future release. We have requested that this be implemented in v4.3. The 
> only work-around I know of is to duplicate the data to index the word token 
> in its entirety.
> 
> On Aug 24, 2010, at 1:07 PM, Debabrata Jena wrote:
> 
>> Hi,
>> 
>> This is regarding not being able to search in for a phrase/search term in an 
>> element in which phrase is combination of text and node . Please find the 
>> details below and sample data attached.
>> Use Case : search for a phrase in which phrase is a combination of text and 
>> node. For ex. search for "Magnetic anisotropy data of C24H12" Following is 
>> the XML representation for the same phrase :
>>   
>>Magnetic anisotropy data of C
>>   24
>>H
>>   12
>>   
>> Approach followed: Added Phrase Through element for Subscript element so 
>> that text inside the Subscript element can be search able.
>> 
>> Current State : we are not able to search for a following text "Magnetic 
>> anisotropy data of C24H12" in Title element by using cts:element-query. 
>> However, we are able to search for the same text if we pass the search term 
>> with spaces as following "Magnetic anisotropy data of C 24 H 12" in the 
>> cts:element-query.
>> Please advise what else needs to be done so that we can search successfully 
>> for the above scenario.
>> 
>> 
>> Thanks,
>> Debabarata
>> ___
>> 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] Phase Through Search problem

2010-08-24 Thread Shannon
Hi Debabarata, 

If I'm not mistaken, you want a "Word-Through" which is not currently 
supported. MarkLogic has filed an RFE (#5849, "Enable per-database word-through 
specifications", as well as a Word-Around) for consideration in a future 
release. We have requested that this be implemented in v4.3. The only 
work-around I know of is to duplicate the data to index the word token in its 
entirety.

On Aug 24, 2010, at 1:07 PM, Debabrata Jena wrote:

> Hi,
> 
> This is regarding not being able to search in for a phrase/search term in an 
> element in which phrase is combination of text and node . Please find the 
> details below and sample data attached.
> Use Case : search for a phrase in which phrase is a combination of text and 
> node. For ex. search for "Magnetic anisotropy data of C24H12" Following is 
> the XML representation for the same phrase :
>
> Magnetic anisotropy data of C
>24
> H
>12
>
> Approach followed: Added Phrase Through element for Subscript element so that 
> text inside the Subscript element can be search able.
> 
> Current State : we are not able to search for a following text "Magnetic 
> anisotropy data of C24H12" in Title element by using cts:element-query. 
> However, we are able to search for the same text if we pass the search term 
> with spaces as following "Magnetic anisotropy data of C 24 H 12" in the 
> cts:element-query.
>  Please advise what else needs to be done so that we can search successfully 
> for the above scenario.
> 
>  
>  Thanks,
>  Debabarata
> ___
> 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


[MarkLogic Dev General] Element range index RFE

2010-08-13 Thread Shannon
Hi MarkLogic,

I'd like to request a feature: XPath support for specifying the element on 
which to create a range index. For example, in this TEI case, I want a range 
index on the title element only when its parent is the bibl element. It may 
take some doing to implement, but it would be extremely useful to this user and 
probably many others. If not full XPath support, then a predicate, or at least 
a field to input a parent localname. It'd minimize the necessity to transform 
the data, and workarounds when a range index is the perfect solution. Thanks!

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


Re: [MarkLogic Dev General] MarkLogic Certifications

2010-08-12 Thread Shannon
Terrific suggestion. I'm interested in information about this as well.

On Aug 12, 2010, at 12:31 AM, Sunil Reddy wrote:

> Hi All,
>  
> Are there any certification exams available for MarkLogic professionals 
> (Developers/Architects) ?
> If not, it would be great if MarkLogic plans for something of that sort.
>  
> Regards,
> Sunil Reddy
>  
> 
> Disclaimer :-
> 
> "This communication contains information which is confidential and may also 
> be 
> legally privileged.It is for the exclusive use of the intended recipient/s.
> 
> If you are not the intended recipient of this mail, please delete it 
> immediately and notify the
> sender on +91 22 6660 6600 or by return e-mail confirming such deletion. Any 
> use, distribution, 
> disclosure or copying this electronic mail except by its intended recipient 
> may be unlawful.
> 
> Rave has scanned this email for viruses but does not accept any 
> responsibility once this email 
> has been transmitted."
> 
> 
> ___
> 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] Totally odd search:search behavior

2010-08-11 Thread Shannon
Micah, thanks a lot. I'm a fan of the debug option, but my mistake was in 
assuming Search API is the culprit :-) I'll check on that, get more 
information, and if the solution doesn't jump out at me, take it to Support. 
Have a great day,
Shannon

On Aug 11, 2010, at 1:44 PM, Micah Dubinko wrote:

> Shannon,
> 
> Include the option true, and you will get some additional 
> output, including the full flwor that gets used to run the search. Then you 
> can determine
> 
> 1) Does the flwor (including cts:search) look correct?
> 2) Does the flowr return the expected results when run in CQ or a similar 
> environment?
> 
> Those will help narrow down the search aspect, and determine whether the 
> problem is happening in Search API or not. Going through support is also an 
> option; they are good at asking the standard set of questions (like what 
> version of the server are you running?; are you using any fragmentation?; 
> what do your data look like?; etc.
> 
> Thanks! -m
> 
> On Aug 11, 2010, at 9:34 AM, Shannon wrote:
> 
>> Hi again,
>> 
>> First, I realize in my previous post (which has not been posted yet and is 
>> awaiting moderator's approval because it contains images--hope it gets 
>> approved soon...) I was not actually passing $options to search:search, 
>> sorry -- although it does not affect the point of my note -- but now I am 
>> and I am getting extremely weird results in a particular search:search case.
>> 
>> I have outlined 4 cases below. The first 3 return the correct results. I 
>> have verified the counts, the number of results is accurate and the snippets 
>> look good.
>> 
>> However, case 4 drives me into a ditch for two reasons: @total should be 30, 
>> not 29 (it is omitting document LBJ-0545.xml entirely even though it is 
>> retrieved in the other cases and it definitely contains the search term), 
>> and while @total is 29, only 17 results are actually returned (I have pasted 
>> the output below--the highest @index is 17).
>> 
>> Can anyone demystify #4 for me because it looks very, very wrong and is 
>> missing a document which is unsettling.
>> 
>> So, search:search by itself from Search API is returning incorrect results, 
>> and search:search within AppBuilder is returning incorrect snippets. Could 
>> really use some support here guys, thanks.
>> 
>> 1 --
>> 
>> xquery version "1.0-ml";
>> import module namespace search = "http://marklogic.com/appservices/search";
>>   at "/MarkLogic/appservices/search/search.xqy";
>> 
>> let $options :=
>> http://marklogic.com/appservices/search";>
>> /tei:TEI/tei:text/tei:body/tei:div
>> 
>>  case-insensitive
>> 
>> 
>> return
>> search:search("Peace", $options, 1, 30)
>> 
>> =>
>> 
>> > 
>> 2 --
>> 
>> xquery version "1.0-ml";
>> import module namespace search = "http://marklogic.com/appservices/search";
>>   at "/MarkLogic/appservices/search/search.xqy";
>> 
>> let $options :=
>> http://marklogic.com/appservices/search";>
>> /tei:TEI/tei:text/tei:body/tei:div
>> 
>>  case-insensitive
>> 
>> 
>> return
>> search:search("peace", $options, 1, 30)
>> 
>> =>
>> 
>> > 
>> 3 --
>> 
>> xquery version "1.0-ml";
>> import module namespace search = "http://marklogic.com/appservices/search";
>>   at "/MarkLogic/appservices/search/search.xqy";
>> 
>> let $options :=
>> http://marklogic.com/appservices/search";>
>> /tei:TEI/tei:text/tei:body/tei:div
>> 
>>  case-sensitive
>> 
>> 
>> return
>> search:search("Peace", $options, 1, 30)
>> 
>> =>
>> 
>> > 
>> 4 --
>> 
>> xquery version "1.0-ml";
>> import module namespace search = "http://marklogic.com/appservices/search";
>>   at "/MarkLogic/appservices/search/search.xqy";
>> 
>> let $options :=
>> http://marklogic.com/appservices/search";>
>> /tei:TEI/tei:text/tei:body/tei:div
>> 
>>  case-sensitive
>> 
>> 
>> return
>> search:search("peace", $options, 1, 30)
>> 
>> =>
>> 
>> > xmlns:search="http://marklogic.com/appservices/search";>
>> > path="fn:doc("LBJ-2660.xml")/tei:TEI/tei:text/tei:body/tei:div[2]" 
>> score="156" confidence="0.405106" fitnes

[MarkLogic Dev General] Speaking of

2010-08-11 Thread Shannon
Should I be mailing Support or consulting the community? Not always certain of 
the best track regarding troubleshooting. 

Sent from my iPhone
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] Totally odd search:search behavior

2010-08-11 Thread Shannon
Hi again,

First, I realize in my previous post (which has not been posted yet and is 
awaiting moderator's approval because it contains images--hope it gets approved 
soon...) I was not actually passing $options to search:search, sorry -- 
although it does not affect the point of my note -- but now I am and I am 
getting extremely weird results in a particular search:search case. 

I have outlined 4 cases below. The first 3 return the correct results. I have 
verified the counts, the number of results is accurate and the snippets look 
good. 

However, case 4 drives me into a ditch for two reasons: @total should be 30, 
not 29 (it is omitting document LBJ-0545.xml entirely even though it is 
retrieved in the other cases and it definitely contains the search term), and 
while @total is 29, only 17 results are actually returned (I have pasted the 
output below--the highest @index is 17).

Can anyone demystify #4 for me because it looks very, very wrong and is missing 
a document which is unsettling.

So, search:search by itself from Search API is returning incorrect results, and 
search:search within AppBuilder is returning incorrect snippets. Could really 
use some support here guys, thanks.

1 --

xquery version "1.0-ml";
import module namespace search = "http://marklogic.com/appservices/search";
at "/MarkLogic/appservices/search/search.xqy";

let $options :=
 http://marklogic.com/appservices/search";>
/tei:TEI/tei:text/tei:body/tei:div
  
   case-insensitive
   
 
return
search:search("Peace", $options, 1, 30)

=>

http://marklogic.com/appservices/search";
at "/MarkLogic/appservices/search/search.xqy";

let $options :=
 http://marklogic.com/appservices/search";>
/tei:TEI/tei:text/tei:body/tei:div
  
   case-insensitive
   
 
return
search:search("peace", $options, 1, 30)

=>

http://marklogic.com/appservices/search";
at "/MarkLogic/appservices/search/search.xqy";

let $options :=
 http://marklogic.com/appservices/search";>
/tei:TEI/tei:text/tei:body/tei:div
  
   case-sensitive
   
 
return
search:search("Peace", $options, 1, 30)

=>

http://marklogic.com/appservices/search";
at "/MarkLogic/appservices/search/search.xqy";

let $options :=
 http://marklogic.com/appservices/search";>
/tei:TEI/tei:text/tei:body/tei:div
  
   case-sensitive
   
 
return
search:search("peace", $options, 1, 30)

=>

http://marklogic.com/appservices/search";>
  

  ...land.
 Under our system of government, local authorities have the basic 
responsibility for civil 
peace...

  
  

  ...and
 to maintaining law and order, emphasizing the responsibilities of local 
officials for "civil peace." He ended his 
statement on this matter by explaining, "a Federal police 
force...

  
  

  ...the
 sick and the lame and the old and the poor people and education and 
peace.  And 
peace in the world, and you've got to do 
something besides talk about it

  
  

  ...told
 me that he wanted me to assure you
that there would be complete 
peace and order, law and order, in St.
Helena Parish. I called you...

  
  

  ...mudslinging.
 They want to talk bread-and-butter issues. They want to talk about
peace and war. 
They want to talk about nuclear holy-caust 

  
  

  ...to
 the actual vote in November, they'll be more concerned first about the 
peace. They'll be concerned
about the prosperity. They'll be concerned about 
the...
  ...let
 alone the Presidency, are a disservice to our national security, a disservice 
to peace, and, as for that matter, a great 
disservice to the entire free world

  
  

  ...people.
 He said that he had been assured by everybody that he'll have complete 
peace and order in that parish. He issued 
a statement and said that you asked...

  
  

  ...advise
 with you some, because I see you stand up in meetings and speak your 
peace, and it's always on the side of the 
folks.

  
  

  
 was in on it. The justice of the peace 
was in on it. And there were seven other men. We have all 
those...

  
  

  ...
 brief fragment of office conversation, with McGeorge Bundy saying “only
firmness makes 
peace.” President Johnson asks the 
operator to keep Senator
 ...

  
  

  And
 I hope that your trip is going to mean serenity and 
peace and just a
revitalization. And I know you’ve gone through 
years of just...

  
  

  ...morals
 and confidence in the administration of the law and of people’s right to 
peace and security on
the streets and in their homes, and that you want 
the...

  
  

  ...judicious
 fellow. He’s a pretty careful fellow. He’s
pretty strong on 
peace. That’s showing up in all of our 

Re: [MarkLogic Dev General] possible snippet bug

2010-08-05 Thread Shannon
Hi Mike,
I only see one result in your example. 

Sent from my iPhone

On Aug 5, 2010, at 12:06, Michael Brown  wrote:

> I am experiencing some unexpected functionality when I attempt to call 
> search:snippet()
> 
>  
> 
> The snippet returned does not always have all the text that the original did, 
> and does not always indicate the removal of text via an ellipses. This seems 
> to happen when some of the text is in an anchor tag.
> 
>  
> 
> Following my message is a cq script that reproduces the bug (Notice the loss 
> of the word topic in the second result returned).
> 
>  
> 
> -Mike
> 
>  
> 
> import module namespace search = "http://marklogic.com/appservices/search"; at 
> "/MarkLogic/appservices/search/search.xqy";
> 
>  
> 
> let $results :=
> 
>  path="fn:doc("/published/foo.xml")/webml" score="171" 
> confidence="0.351263" fitness="0.861105" 
> xmlns:search="http://marklogic.com/appservices/search";>
> 
>status="publish">
> 
> 
> 
>   Foo
> 
>   
> 
>   
> 
> 
> 
>   Foo is the first topic of 
> discussion. we will now discuss Foo...
> 
> 
> 
>   
> 
> 
> 
>   
> 
> 
> 
>  
> 
> let $ctsquery :=
> 
> http://marklogic.com/cts";>
> 
>   foo
> 
>   case-insensitive
> 
> 
> 
>  
> 
> let $options :=
> 
>  xmlns:search="http://marklogic.com/appservices/search";>
> 
>   50
> 
>   10
> 
>   1000
> 
>   
> 
> 
> 
>   
> 
> 
> 
>  
> 
> return search:snippet($results, $ctsquery, $options)
> 
> 
> 
> NOTICE: This email message is for the sole use of the intended recipient(s) 
> and may contain confidential and privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not the 
> intended recipient, please contact the sender by reply email and destroy all 
> copies of the original message.
> 
> 
> ___
> 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] question about search:search constraint

2010-07-22 Thread Shannon
Albeit, the API doc isn't clear that you can specify a collation on a range, 
although it can be inferred from the  example and 
search:suggest examples. But it probably should be mentioned in the  
definition in the search:search section.

On Jul 22, 2010, at 12:03 PM, helen chen wrote:

> Hi Silvano and Shannon,
> 
> I tried them and they work.  Does anyone know where I can get a full document 
> of search:search? It will help me learning it.
> 
> Thanks, Helen
> 
> 
> On Jul 22, 2010, at 11:44 AM, Silvano Ravotto wrote:
> 
>> Sorry – cut and paste error:
>>  
>> http://marklogic.com/appservices/search";>
>>   
>>   > collation="http://marklogic.com/collation/en/MO";>   
>>  collation=a
>> 
>>   
>> 
>> 
>>  
>>  
>>  
>>  
>> From: general-boun...@developer.marklogic.com 
>> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Silvano Ravotto
>> Sent: Thursday, July 22, 2010 11:43 AM
>> To: General Mark Logic Developer Discussion
>> Subject: Re: [MarkLogic Dev General] question about search:search constraint
>>  
>> Helen,
>>  
>> You can specify the collation as an attribute of the range element:
>>  
>> http://marklogic.com/appservices/search";>
>>   
>>   > collation="http://marklogic.com/collation/en/MO";>   
>> collation=a
>> 
>>   
>> 
>> 
>>  
>> Silvano
>>  
>> From: general-boun...@developer.marklogic.com 
>> [mailto:general-boun...@developer.marklogic.com] On Behalf Of helen chen
>> Sent: Thursday, July 22, 2010 11:30 AM
>> To: General Mark Logic Developer Discussion
>> Subject: [MarkLogic Dev General] question about search:search constraint
>>  
>> I'm learning marklogic search, I want to create a range constraint so I can 
>> get the facet. The problem is: the element range index is created using the 
>> collation "http://marklogic.com/collation/en/MO";, not the default collation 
>> in search:search.
>>  
>> so when I create constraint like the following:
>> 
>>   
>> limit=10
>> 
>>   
>> 
>>  
>> there is no place for me to specify the collation, and I got error 
>> Description: XDMP-ELEMRIDXNOTFOUND: 
>> cts:element-values(fn:QName("metasearch", "meta-article-coden"), (), 
>> ("type=string", "limit=10", "concurrent"), cts:word-query("perovskite-type", 
>> ("case-insensitive","lang=en"), 1), xs:double("1"), ()) -- No string element 
>> range index for fn:QName("metasearch", "meta-article-coden") 
>> http://marklogic.com/collation/
>> 
>>  
>> I looked at the search:search API, it didn't list anything for range 
>> constraint to specify the collation. 
>>  
>> Does anyone know how I can do it?
>>  
>> Thanks, Helen
>> ___
>> 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] question about search:search constraint

2010-07-22 Thread Shannon
Helen,

In addition to the Search Developer's Guide , the API doc 
<http://developer.marklogic.com/pubs/4.1/apidocs/SearchAPI.html#search:search> 
hyperilluminates the options nodes.

On Jul 22, 2010, at 12:03 PM, helen chen wrote:

> Hi Silvano and Shannon,
> 
> I tried them and they work.  Does anyone know where I can get a full document 
> of search:search? It will help me learning it.
> 
> Thanks, Helen
> 
> 
> On Jul 22, 2010, at 11:44 AM, Silvano Ravotto wrote:
> 
>> Sorry – cut and paste error:
>>  
>> http://marklogic.com/appservices/search";>
>>   
>>   > collation="http://marklogic.com/collation/en/MO";>   
>>  collation=a
>> 
>>   
>> 
>> 
>>  
>>  
>>  
>>  
>> From: general-boun...@developer.marklogic.com 
>> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Silvano Ravotto
>> Sent: Thursday, July 22, 2010 11:43 AM
>> To: General Mark Logic Developer Discussion
>> Subject: Re: [MarkLogic Dev General] question about search:search constraint
>>  
>> Helen,
>>  
>> You can specify the collation as an attribute of the range element:
>>  
>> http://marklogic.com/appservices/search";>
>>   
>>   > collation="http://marklogic.com/collation/en/MO";>   
>> collation=a
>> 
>>   
>> 
>> 
>>  
>> Silvano
>>  
>> From: general-boun...@developer.marklogic.com 
>> [mailto:general-boun...@developer.marklogic.com] On Behalf Of helen chen
>> Sent: Thursday, July 22, 2010 11:30 AM
>> To: General Mark Logic Developer Discussion
>> Subject: [MarkLogic Dev General] question about search:search constraint
>>  
>> I'm learning marklogic search, I want to create a range constraint so I can 
>> get the facet. The problem is: the element range index is created using the 
>> collation "http://marklogic.com/collation/en/MO";, not the default collation 
>> in search:search.
>>  
>> so when I create constraint like the following:
>> 
>>   
>> limit=10
>> 
>>   
>> 
>>  
>> there is no place for me to specify the collation, and I got error 
>> Description: XDMP-ELEMRIDXNOTFOUND: 
>> cts:element-values(fn:QName("metasearch", "meta-article-coden"), (), 
>> ("type=string", "limit=10", "concurrent"), cts:word-query("perovskite-type", 
>> ("case-insensitive","lang=en"), 1), xs:double("1"), ()) -- No string element 
>> range index for fn:QName("metasearch", "meta-article-coden") 
>> http://marklogic.com/collation/
>> 
>>  
>> I looked at the search:search API, it didn't list anything for range 
>> constraint to specify the collation. 
>>  
>> Does anyone know how I can do it?
>>  
>> Thanks, Helen
>> ___
>> 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] question about search:search constraint

2010-07-22 Thread Shannon
Hi Helen,

@collation is an attribute of the  element.

On Jul 22, 2010, at 11:29 AM, helen chen wrote:

> I'm learning marklogic search, I want to create a range constraint so I can 
> get the facet. The problem is: the element range index is created using the 
> collation "http://marklogic.com/collation/en/MO";, not the default collation 
> in search:search.
> 
> so when I create constraint like the following:
> 
>   
> limit=10
> 
>   
> 
> 
> there is no place for me to specify the collation, and I got error 
> Description: XDMP-ELEMRIDXNOTFOUND: cts:element-values(fn:QName("metasearch", 
> "meta-article-coden"), (), ("type=string", "limit=10", "concurrent"), 
> cts:word-query("perovskite-type", ("case-insensitive","lang=en"), 1), 
> xs:double("1"), ()) -- No string element range index for 
> fn:QName("metasearch", "meta-article-coden") http://marklogic.com/collation/
> 
> 
> I looked at the search:search API, it didn't list anything for range 
> constraint to specify the collation. 
> 
> Does anyone know how I can do it?
> 
> Thanks, Helen
> ___
> 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] what is wrong with this code..

2010-07-14 Thread Shannon
Isn't there one too many right parens?

xdmp:log(fn:concat(("URL Found***OK***",$URL, "AvalonConsult.com"))

should be

> xdmp:log(fn:concat("URL Found***OK***",$URL, "AvalonConsult.com"))


no?

On Jul 14, 2010, at 11:32 AM, Varinder Tandon wrote:

> = sign works fine..the problem starts when I try multiple statements in else 
> block..
> 
> On Wed, Jul 14, 2010 at 11:29 AM, Brian Green  
> wrote:
> I think you want to have 
> if ($response_code eq 200)  
> or maybe
> if ($response_code eq '200')
> 
> On Wed, Jul 14, 2010 at 9:24 AM, Varinder Tandon  
> wrote:
> I am getting error at "else" and on last curly "};"..
> 
> declare namespace html = "http://www.w3.org/1999/xhtml";;
> declare namespace http = "xdmp:http";
>   
> declare function local:checkURL($URL as xs:string){
> let $response := xdmp:http-get($URL)[1][1]
> let $response_code := $response/http:code
> return
> if($response_code = 200)
> then xdmp:log(fn:concat(("URL Found***OK***",$URL, "AvalonConsult.com"))
> else xdmp:log(fn:concat(("URL not Found***Deleted***",$URL, 
> "AvalonConsult.com")),
> xdmp:document-delete($URL)
> };
> 
> for $doc in fn:doc()
> return local:checkURL(fn:base-uri($doc))
> 
> 
> 
> 
> -- 
> Thx
> Varinder Tandon
> Avalon Consulting LLC
> Cell:917-376-6802
> 
> This message is part of a discussion named:
> MarkLogic/XQuery Technical Discussion
> and can be found at:
> https://quest.avalonconsult.com/gm/discussion-1.21.2602
> 
> 
> 
> -- 
> Brian Green
> gre...@avalonconsult.com
> 801-884-7127
> 
> 
> 
> -- 
> Thx
> Varinder Tandon
> Avalon Consulting LLC
> Cell:917-376-6802
> ___
> 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] Loading just the doc uri using fn:doc function..

2010-07-14 Thread Shannon
Varinder, try this

for $i in collection()
return base-uri($i)

On Jul 14, 2010, at 10:01 AM, Varinder Tandon wrote:

> How can I just load the Doc URI using fn:doc function. I want to see all the 
> URI for all the documents stored in a database.
> 
> -- 
> Thx
> Varinder Tandon
> Avalon Consulting LLC
> Cell:917-376-6802
> ___
> 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] Search API: supply a default search:search constraint?

2010-06-25 Thread Shannon
Great, thanks!  In the meantime I'll explore the other possibilities you and 
Micah shared. Have a good weekend!

Sent from my iPhone

On Jun 23, 2010, at 19:12, Colleen Whitney  
wrote:

> Shannon, 
> 
> That sounds useful to me too, I'll put in an RFE.  :-)
> 
> Would a Word Query configuration on the database be feasible for your use 
> case?  
> 
> --Colleen
> 
> From: general-boun...@developer.marklogic.com 
> [general-boun...@developer.marklogic.com] On Behalf Of Shannon 
> [shifl...@virginia.edu]
> Sent: Wednesday, June 23, 2010 3:31 PM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] Search API: supply a default search:search   
>   constraint?
> 
> Hello,
> 
> Using Search API, I need search:search, when no operator is specified, to be 
> constrained by a word-query of field -- Can a default constraint be 
> configured in an options node, or should I omit the field approach and use 
> unions in the searchable expression instead? My aim is to define many 
> includes and excludes, and a field would be more elegant -- Maybe a 
> default-query-source, similar to default-suggestion-source, would be a useful 
> option?
> 
> Thanks in advance.
> 
> Best,
> Shannon
> ___
> 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


[MarkLogic Dev General] Search API: supply a default search:search constraint?

2010-06-23 Thread Shannon
Hello,

Using Search API, I need search:search, when no operator is specified, to be 
constrained by a word-query of field -- Can a default constraint be configured 
in an options node, or should I omit the field approach and use unions in the 
searchable expression instead? My aim is to define many includes and excludes, 
and a field would be more elegant -- Maybe a default-query-source, similar to 
default-suggestion-source, would be a useful option?

Thanks in advance.

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


[MarkLogic Dev General] Search API collection constraint

2010-06-11 Thread Shannon
Hello,

Assuming that collection names used internally may not be the most 
user-friendly naming conventions (in my case, the collection constraint name is 
"pub", and I want like to make it possible for the user to enter a query text 
of "pub:Jefferson" when the specified collection is named "TSJN" for internal 
reasons), is there a way to achieve this in the API? With an extension? What 
would be the best practice? Or should I send an RFE to Support? TIA. 

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


Re: [MarkLogic Dev General] Search API snippet

2010-06-09 Thread Shannon
Pradeep, as a work-around to the undesired behavior, I modified 
asc:transform-result in standard.xqy, to inspect each result, and if the query 
is found only in an element that contains metadata, which is unsuitable for 
display in results, then my preferred element is returned instead (conveniently 
in this case each document in the TEI data contained an abstract element, so I 
chose it)--I know it's not recommended to use static snippets, but it was 
better than the default in the current release, and it works especially well 
when you're drilling down a large dataset using faceted range constraints 
(another instance in which the default snippets aren't useful). You might take 
this approach of transforming snippets in your response output whether or not 
you're using Application Builder.

On Jun 9, 2010, at 12:14 PM, Pradeep Maddireddy wrote:

> Hi Shanon
> 
>  That mapping helps only if the search term is found in multiple
> elements, it will return all those elements, we can also control the
> element to be preferred.
> 
> But in my case, if the search term is only found in title and no where
> else, search API only returns the title element as snippet which
> doesn't have enough text to be displayed on search results page.
> 
> Thanks
> Pradeep Maddireddy
> 
> On 6/9/10, Shannon  wrote:
>> 
>> Hi Pradeep,
>> 
>> Check out section 2.2.6.1 of Search Developer's Guide: max-snippet-chars and
>> preferred-elements child elements of the transform-results options node
>> should address those requirements.
>> 
>> Best,
>> Shannon
>> 
>> On Jun 9, 2010, at 10:48 AM, Pradeep Maddireddy wrote:
>> 
>>> Hi..!
>>> 
>>> I always want atleast 300 to 400 char of snippet to be returned by
>>> the search API.
>>> Is there any setting that would help me get  300 to 400 char of snippet.
>>> 
>>> Most of the times when the hit is aginst a title or author element
>>> only that particular element is being returned as snippet, this will
>>> not be enough text to be displayed in the search results screen.
>>> 
>>> 
>>> Thanks
>>> Pradeep Maddireddy
>>> ___
>>> 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

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


Re: [MarkLogic Dev General] Search API snippet

2010-06-09 Thread Shannon
Yes, that is true -- I reported it back in April. It is bug report #10005: 
"search:snippet does not return snippets in the preferred elements". I was told 
the engineering team will review the case and address it in a future 
maintenance release.

On Jun 9, 2010, at 12:14 PM, Pradeep Maddireddy wrote:

> Hi Shanon
> 
>  That mapping helps only if the search term is found in multiple
> elements, it will return all those elements, we can also control the
> element to be preferred.
> 
> But in my case, if the search term is only found in title and no where
> else, search API only returns the title element as snippet which
> doesn't have enough text to be displayed on search results page.
> 
> Thanks
> Pradeep Maddireddy
> 
> On 6/9/10, Shannon  wrote:
>> 
>> Hi Pradeep,
>> 
>> Check out section 2.2.6.1 of Search Developer's Guide: max-snippet-chars and
>> preferred-elements child elements of the transform-results options node
>> should address those requirements.
>> 
>> Best,
>> Shannon
>> 
>> On Jun 9, 2010, at 10:48 AM, Pradeep Maddireddy wrote:
>> 
>>> Hi..!
>>> 
>>> I always want atleast 300 to 400 char of snippet to be returned by
>>> the search API.
>>> Is there any setting that would help me get  300 to 400 char of snippet.
>>> 
>>> Most of the times when the hit is aginst a title or author element
>>> only that particular element is being returned as snippet, this will
>>> not be enough text to be displayed in the search results screen.
>>> 
>>> 
>>> Thanks
>>> Pradeep Maddireddy
>>> ___
>>> 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

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


Re: [MarkLogic Dev General] Search API snippet

2010-06-09 Thread Shannon

Hi Pradeep,

Check out section 2.2.6.1 of Search Developer's Guide: max-snippet-chars and 
preferred-elements child elements of the transform-results options node should 
address those requirements.

Best,
Shannon

On Jun 9, 2010, at 10:48 AM, Pradeep Maddireddy wrote:

> Hi..!
> 
>  I always want atleast 300 to 400 char of snippet to be returned by
> the search API.
> Is there any setting that would help me get  300 to 400 char of snippet.
> 
> Most of the times when the hit is aginst a title or author element
> only that particular element is being returned as snippet, this will
> not be enough text to be displayed in the search results screen.
> 
> 
> Thanks
> Pradeep Maddireddy
> ___
> 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] XQDoc in ML version 4?

2010-03-03 Thread Shannon
I believe these instructions work with the current version too:

http://xqdoc.org/qs_marklogic.html

Maybe Darin will chime in if I'm wrong.

On Mar 3, 2010, at 3:42 PM, Karl Erisman wrote:

> What is the status of xqDoc support for MarkLogic?  Does XQDoc work
> with ML version 4?  It appears to me that it does not.  Can anyone
> suggest any alternatives to xqDoc?  I prefer keeping certain types of
> documentation inline with the source code for maintainability reasons.
> 
> Thanks,
> Karl
> ___
> General mailing list
> General@developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

-- 
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] Building the Oscars Sample Application

2010-02-05 Thread Shannon
When you say you deleted the app, do you mean from Application Builder 
Projects, or by removing all traces (forest, db, etc.) in Admin Console then 
starting from scratch (New Sample Project with "New database" as the content 
source)? 

On Feb 5, 2010, at 1:47 PM, Paul Hermans wrote:

> Hi Shannon,
> 
> Thanks for the reply.
> 
> On Fri, February 5, 2010 7:29 pm, Shannon wrote:
>> Hi Paul,
>> 
>> I've encountered similar errors with various causes when attempting to
>> build. And I could not deploy until I upgraded to the latest maintenance
>> release of MarkLogic Server (at the time it was 4.1-3, but I think the
>> current is now -4).
> 
> I'm already on 4.1-4.
> 
>> 
>> I successfully built and deployed after deleting every trace of the sample
>> app (forest, database, etc.) and upgrading.
> 
> Deleted the app, but nothing seems to have changed.
> 
> Paul
> 
>> 
>> I suggest you check your version and try the same steps.
>> 
>> Best,
>> Shannon
>> 
>> On Feb 5, 2010, at 2:38 AM, Paul Hermans wrote:
>> 
>>> Dear,
>>> 
>>> While trying "1.3 Building the Oscars Sample Application" from the
>>> "Application Builder Developer's Guide."
>>> 
>>> I do get on every page the warning: could not check projects for errors.
>>> 
>>> And when trying to deploy an error 'There was an error trying to deploy
>>> your application' with a suggestion to look into the log files.
>>> 
>>>  SVC-INTERNAL
>>>  
>>>  1.0-ml
>>>  Internal error
>>>  SVC-INTERNAL: search:check-options($options,
>>> fn:true()) -- Internal error: mktime: Invalid
>>> argument
>>>  false
>>>  search:check-options($options, fn:true())
>>>  
>>>mktime: Invalid argument
>>>  
>>> 
>>> I'm on windows 7 with Region and Language Format: Dutch(Belgium).
>>> 
>>> 
>>> --
>>> Kind Regards,
>>> Paul
>>> 
>>> ___
>>> General mailing list
>>> General@developer.marklogic.com
>>> http://xqzone.com/mailman/listinfo/general
>> 
>> 
> 
> 
> -- 
> Kind Regards,
> Paul Hermans
> 
> -
> ProXML bvba
> XML and OWL/RDF services
> (w) www.proxml.be
> (b) experiences and opinions
> (e) p...@proxml.be
> (t)  +32 15 23 00 76
> (m) +32 473 66 03 20
> 
> Narcisweg 17
> 3140 Keerbergen
> Belgium
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

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


Re: [MarkLogic Dev General] Building the Oscars Sample Application

2010-02-05 Thread Shannon
Hi Paul,

I've encountered similar errors with various causes when attempting to build. 
And I could not deploy until I upgraded to the latest maintenance release of 
MarkLogic Server (at the time it was 4.1-3, but I think the current is now -4).

I successfully built and deployed after deleting every trace of the sample app 
(forest, database, etc.) and upgrading.

I suggest you check your version and try the same steps.

Best,
Shannon 

On Feb 5, 2010, at 2:38 AM, Paul Hermans wrote:

> Dear,
> 
> While trying "1.3 Building the Oscars Sample Application" from the
> "Application Builder Developer's Guide."
> 
> I do get on every page the warning: could not check projects for errors.
> 
> And when trying to deploy an error 'There was an error trying to deploy
> your application' with a suggestion to look into the log files.
> 
>   SVC-INTERNAL
>   
>   1.0-ml
>   Internal error
>   SVC-INTERNAL: search:check-options($options,
> fn:true()) -- Internal error: mktime: Invalid
> argument
>   false
>   search:check-options($options, fn:true())
>   
> mktime: Invalid argument
>   
> 
> I'm on windows 7 with Region and Language Format: Dutch(Belgium).
> 
> 
> -- 
> Kind Regards,
> Paul
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

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


Re: [MarkLogic Dev General] Word query included element weight

2010-01-15 Thread Shannon
Thanks, it's working now, see the rest of my e-mail (sorry it was so verbose). 
I made a suggestion that the valid range should be documented because it wasn't 
rounding down 500 properly.

Best,
Shannon

On Jan 15, 2010, at 5:27 PM, Danny Sokolsky wrote:

> It would need to be in the namespace of your title element.  In the word 
> query included element interface,  make sure you specify the proper namespace 
> and localname for the included element.
> 
> -Danny 
> 
> -Original Message-
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
> Sent: Friday, January 15, 2010 2:10 PM
> To: General Mark Logic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Word query included element weight
> 
> Danny,
> 
> Thank you for this.
> 
> The reindexer is enabled and the throttle is set to 5. It was reindexed, and 
> I triggered it manually, just in case. Looked at the status summary to 
> confirm that it happened. Happens quickly as the database is only 31MB.
> 
> I have not declared a default namespace, so I assume I leave that field blank?
> 
> ___
> General mailing list
> General@developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

-- 
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] Word query included element weight

2010-01-15 Thread Shannon
Danny,

Thank you for this.

The reindexer is enabled and the throttle is set to 5. It was reindexed, and I 
triggered it manually, just in case. Looked at the status summary to confirm 
that it happened. Happens quickly as the database is only 31MB.

I have not declared a default namespace, so I assume I leave that field blank?

<>

I changed the weight to 16 and just reindexed.

And _now_ I get what I expected!  

'Cautio Criminalis' Or A Book On Witch Trials
'Cautio Criminalis' Or A Book On Witch Trials
Witchcraft and the Papacy
I, Tituba, Black Witch of Salem
Shaman of Oberstdorf
Shaman of Oberstdorf
"Evil People"
With Paintbrush and Shovel
Virginia Folk Legends

With a value of 9, just an FYI, this query resulted in this:

for $hit at $count in cts:search(
  collection(),
  cts:word-query("witch")
)
return element hit {
  attribute score { cts:score($hit) },
  string($hit//b203)
}

=>

"Evil People"
Witchcraft and the Papacy
With Paintbrush and Shovel
Virginia Folk Legends
'Cautio Criminalis' Or A Book On Witch Trials
Shaman of Oberstdorf
I, Tituba, Black Witch of Salem

Maybe there is a bug in the way the value is being rounded down?

Also, I referenced "13.1.3, Adding a Weight to Boost or Lower the Relevance of 
an Included Element" in admin_guide and there is nothing documented about the 
weighting range.  

At any rate, thanks for your help!

Best,
Shannon

On Jan 15, 2010, at 4:40 PM, Danny Sokolsky wrote:

> Hi Shannon,
> 
> This does appear to be the right approach.  Did you reindex your database 
> after doing this (or wait for reindexing to complete if reindexing is 
> enabled)?  The word query include weights are built into the indexes.
> 
> Also, the weights should be between -16.0 and 16.0; a weight greater than 16 
> is rounded to 16, and a weight less than -16 is rounded to -16.
> 
> -Danny 
> 
> -Original Message-
> From: general-boun...@developer.marklogic.com 
> [mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
> Sent: Friday, January 15, 2010 1:26 PM
> To: General Mark Logic Developer Discussion
> Subject: [MarkLogic Dev General] Word query included element weight
> 
> Hi,
> 
> If I want to boost the relevance of a title element in the search results in 
> an app deployed with Application Builder, would increasing the weight value 
> of word query includes within that database be the thing to do? I have tried 
> ramping it up, from 3 to 1000 to 9, and it appears to have no effect.
> 
> Thanks,
> Shannon___
> General mailing list
> General@developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
> ___
> General mailing list
> General@developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general

-- 
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


[MarkLogic Dev General] Word query included element weight

2010-01-15 Thread Shannon
Hi,

If I want to boost the relevance of a title element in the search results in an 
app deployed with Application Builder, would increasing the weight value of 
word query includes within that database be the thing to do? I have tried 
ramping it up, from 3 to 1000 to 9, and it appears to have no effect.

Thanks,
Shannon___
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


Re: [MarkLogic Dev General] Problems setting up simple WebDAV app server

2009-10-21 Thread Shannon
I don't know if this is pertinent to your case, but is the database  
your WebDAV server is bound to configured for "automatic" "directory  
creation"?


On Oct 21, 2009, at 2:24 PM, Mattio Valentino wrote:


I'm sure I'm missing something simple on this one.

I have MarkLogic Server 4.1-1 installed on a Windows Server 2003
machine, which is our staging environment.  I'm trying to setup a
quick sample database using existing XML files, so I wanted to have a
WebDAV setup so I could just drag the files into place.

I've followed the admin guide instructions and setup:

Server name: 7008-4d
Root: /
Port: 7008
Database: [selected a newly created and empty database; I also tried
selecting an existing database with content]

The rest of the fields were left in their default state.

When I go to add a network place using http://localhost:7008/, I get
an error message saying "The folder you entered does not appear to be
valid."

For kicks, I went to http://localhost:7008/ in IE.  I got an expected
login dialog and when I submitted it I got a generic 404 error
message.

Any thoughts on what I might be doing wrong here?

Thanks,
Mattio
___
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] Clearstream sur Facebook

2009-10-21 Thread Shannon

What is this?

On Oct 21, 2009, at 10:26 AM, drab...@gmail.com wrote:


I've shared a document with you:

Clearstream sur Facebook
http://docs.google.com/Doc?docid=0AUFW1GONTyoIZGNtdnhjY2tfMTc0ZzhycDUzY3E&hl=en&invite=CPjPhcgG

It's not an attachment -- it's stored online at Google Docs. To open  
this document, just click the link above.


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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] is there anyway to get operating system details using xquery....

2009-09-11 Thread Shannon


http://xqzone.com/pubs/3.2/apidocs/ServerMonitoring.html#host-status

xdmp:host-status returns the architecture and a lot more but am not  
sure if it's enough or if you can infer enough from it.


On Sep 11, 2009, at 11:53 AM, Mohanraj wrote:


hi all,

is there anyway to get operating system details using xquery

Regards,
Mohanraj
Laserwords Pvt ltd.
___
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] Using xdmp:save in MAC OS X

2009-09-11 Thread Shannon
Presently there is no MacOS edition of MarkLogic Server--xdmp:save(),  
unless I'm mistaken, is, for security reasons, only able to write to  
the local file system on which the server, Win or *nix, itself is  
bound.  Output, then retrieve via ssh/Samba from your Mac.


On Sep 11, 2009, at 11:53 AM, Mohanraj wrote:


hi all,

i have used xdmp:save in windows system by specifying the system  
drive path. but don't know how to use this in MAC OS X System. how i  
should specify the system path for mac systems.


regards,
Mohanraj
Laserwords Pvt Ltd.
___
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] appbuilder - problem creating new projects

2009-09-03 Thread Shannon
Pulling strictly from memory, if you let AppBuilder create the sample  
database for you, it'll also automatically create all of the indexes  
for you as well--effectively nipping this problem in the bud.


However, if you fail to take that route initially, then backtracking  
for me caused problems, too: The last time I tried to deploy the  
sample Oscars app, I got a similar message--something generic about an  
error when attempting to deploy, so something unexpected happens when  
going through this process.  I will need to open a Support case on  
it.  Kinda in the same boat you're in at the moment.


On Sep 3, 2009, at 10:22 AM, Jakob Fix wrote:


Hi,

I'm starting to look at the appbuilder application. I encounter
problems simply by trying to follow the instructions for the Oscars
sample application (for upgraders). For the first time, the project
was created fine (i.e. the wizard with the different tabs Appearance,
Search, Sorting, ... Deploy, started), but for both "Search" and
"Sorting" small yellow triangles with exclamation marks were shown.
Clicking on them a popup told me that a number of element range
indexes etc were missing.  In consequence, the application could not
be deployed.  So I started afresh, but was told that the Oscars forest
and database already existed. I then proceeded to remove manually both
items using the System Admin interface.  Since then, attempting to
create a new project (any name, any new database name) gets a popup
saying that the project could not be created. I should mention that
this is an update from 4.0-3 to 4.1-1.  When doing the same on another
machine with a clean install no problems were encountered.  I will try
and remove the App-Builder database + forest and start from scratch.
If you have other ideas, I'm listening.

thanks,
Jakob.
___
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] "Did You mean" functionality in marklogic

2009-08-27 Thread Shannon

Hi, Judie,

You may benefit from reading section 16 of Search Developer's Guide on  
"Using the Spelling Correction Functions" because I think that's the  
API you're looking for.


Best,
Shannon

On Aug 27, 2009, at 10:33 AM, judie pearline wrote:


Hi,

We are developing a search application in Marklogic where we need to  
implement a similar functionality like "Did you mean?"(google). As  
per my understanding there is no built in function available in  
Marklogic(Correct me if i am wrong). Is there any way we can achieve  
this?


 Any suggestion will be helpful.

Thanks,

Judie




start: 2008-06-21 end: -00-00
See the Web's breaking stories, chosen by people like you. Check out  
Yahoo! Buzz.___

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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] xdmp:node-replace()

2009-08-18 Thread Shannon
Extremely helpful, thank you!  I found Ryan Grimm's module to update  
in-memory nodes.  Perfect.  Thanks again,

Shannon

On Aug 18, 2009, at 3:31 PM, Geert Josten wrote:


Yes,

xdmp:node-replace and related update functions operate on nodes in  
databases only. There should be in-memory manipulation functions in  
the Xquery commons suite that can be found in the xqzone svn. You  
should be able to find more details on this page: http://developer.marklogic.com/code/


Kind regards,
Geert






Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig  
van Daidalos BV en is uitsluitend bestemd voor de geadresseerde.  
Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het  
te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.




From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
Sent: dinsdag 18 augustus 2009 21:27
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] xdmp:node-replace()

Hi,
Am I right in thinking that this function does not operate
against constructed XML?  Or has that changed?

Thanks,

--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press PO Box 801079,
Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/




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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


[MarkLogic Dev General] xdmp:node-replace()

2009-08-18 Thread Shannon

Hi,
Am I right in thinking that this function does not operate against  
constructed XML?  Or has that changed?

Thanks,
--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


[MarkLogic Dev General] ("like this")

2009-07-22 Thread Shannon

Hi,

Just observed that search:search() accepts an optional similar> element in the options node.  It sounds to me, this could be  
used as a "More Documents Like This" feature--separate from results,  
is there an API for passing a URI and getting back a list of URIs  
similar to that document?


Thanks,
--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] xquery version

2009-07-16 Thread Shannon
Geert, thanks, you are so right.  It was looking like I could only  
import 1.0-ml modules into my 1.0-ml module, but it's because the 0.9- 
ml module I was trying to import was lacking the version declaration.   
Thanks again--You just saved me a lot of time.


On Jul 16, 2009, at 2:04 PM, Geert Josten wrote:

You don't really need to. Just make sure you have an xquery version  
declaration on top of all your files, and you can mix modules in any  
version..


Kind regards,
Geert






Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig  
van Daidalos BV en is uitsluitend bestemd voor de geadresseerde.  
Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het  
te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.




From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Shannon
Sent: donderdag 16 juli 2009 20:01
To: General Mark Logic Developer Discussion
Subject: [MarkLogic Dev General] xquery version

Anybody have a program that converts modules from 0.9-ml to 1.0-ml?
Thanks.
___
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general



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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


[MarkLogic Dev General] xquery version

2009-07-16 Thread Shannon
Anybody have a program that converts modules from 0.9-ml to 1.0-ml?  
Thanks.

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


Re: [MarkLogic Dev General] Restricting an element range index to a child of another element

2009-07-09 Thread Shannon
Can you add an attribute to the elements you want included?  A field  
word lexicon has support for including only those elements with a  
certain attribute.


On Jul 9, 2009, at 2:58 PM, "Runstein, Robert E. (Contr) (IS)" > wrote:



Hi,

I have documents like the following:


  
Bob
  
  
George
  


I would like to create an element range index that will index the  
my:name values under my:a, but not the my:name values under my:b


I cannot change the namespaces to differentiate between them.  Is  
there a way to do this or do I have to index all the my:name values  
and filter out the ones that came from the my:b element?  Thanks.


Bob

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


Re: [MarkLogic Dev General] Restricting an element range index to a child of another element

2009-07-09 Thread Shannon
This may be a candidate for a field word lexicon because you can  
create inclusions and exclusions, but I do not know if it supports the  
kind of exclusion you need


On Jul 9, 2009, at 2:58 PM, Runstein, Robert E. (Contr) (IS) wrote:


Hi,

I have documents like the following:


  
Bob
  
  
George
  


I would like to create an element range index that will index the  
my:name values under my:a, but not the my:name values under my:b


I cannot change the namespaces to differentiate between them.  Is  
there a way to do this or do I have to index all the my:name values  
and filter out the ones that came from the my:b element?  Thanks.


Bob

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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] ML word tokenizing and soft hyphens

2009-07-08 Thread Shannon
You're describing word-through.  Still got my fingers crossed for that  
RFE ;-)


On Jul 8, 2009, at 10:07 AM, David Sewell wrote:


Phrase-around doesn't work within a word. Even with  defined as a
phrase-around, "multi-lingual" will get indexed as two words,
"multi" and "lingual".

David

On Wed, 8 Jul 2009, Mike Sokolov wrote:

Not sure if this will work, but have you tried replacing hyphens  
with an

element such as:
multi-lingual and defining the element as a phrase- 
around?  If ML
actually treats that as a single word, you should be ok; you would  
also have

to remove hyphens from search terms

-Mike

David Sewell wrote:
A bit of experimentation shows that the Unicode soft hyphen  
character,
U+00AD, is treated as word-dividing for the purposes of MarkLogic  
word

indexing. I.e. given in one's underlying data

 multi­lingual

then cts:word-query("multilingual") won't match.

Is there any workaround?



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



--
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsew...@virginia.edu   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
___
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


[MarkLogic Dev General] Application Builder (Oscars sample)

2009-06-26 Thread Shannon
Well, we've been looking at the 4.1 release notes, and I've started in  
on the new guides (Application Builder and Search Developer); We  
haven't upgraded yet, but I'd really like to see a sample application  
generated by the Application Builder in action -- Is it publicly  
accessible somewhere?  Thanks,

--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Fwd: [MarkLogic Dev General] XCC error

2009-06-09 Thread Shannon
Please disregard, sorry--Colleague David correctly guessed I was using  
an outdated XCC package.


Begin forwarded message:


From: Shannon 
Date: June 9, 2009 2:56:18 PM EDT
To: General Mark Logic Developer Discussion >

Subject: [MarkLogic Dev General] XCC error
Reply-To: General Mark Logic Developer Discussion >


Hi,
Any thoughts on why MLS would throw an XS_DAY_TIME_DURATION error  
via XCC in a transform in oXygen with the following XQuery?


declare namespace RNCN = "http://rotunda.upress.virginia.edu/RNCN";
distinct-values(collection("RNCN")//RNCN:State)

Without distinct-values(), or with in cq, I get results, not an error.

Thanks,
--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


[MarkLogic Dev General] XCC error

2009-06-09 Thread Shannon

Hi,
Any thoughts on why MLS would throw an XS_DAY_TIME_DURATION error via  
XCC in a transform in oXygen with the following XQuery?


declare namespace RNCN = "http://rotunda.upress.virginia.edu/RNCN";
distinct-values(collection("RNCN")//RNCN:State)

Without distinct-values(), or with in cq, I get results, not an error.

Thanks,
--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] Building cts:search queries withconditional logic

2009-06-01 Thread Shannon
Thanks, Mike and Geert -- then the empty sequence is more efficient;  
Glad to know, since that's what I've been using in my code.


On Jun 1, 2009, at 3:59 PM, Michael Blakeley wrote:


It's just an extra constructor.

empty( cts:query( () ) )
=> true

However, that can take up valuable cycles:

for $i in 1 to 1000 * 1000
return cts:query( () )
, data( xdmp:query-meters()/*[1] )
=> PT0.825918S

for $i in 1 to 1000 * 1000
return ()
, data( xdmp:query-meters()/*[1] )
=> PT0.509286S

Still, it's highly unlikely to be the bottleneck in any real-world  
query.


-- Mike

On 2009-06-01 12:44, Shannon wrote:
I'm watching to see if ML has an opinion on your () vs.  
cts:query(()) question!  As to the modularized approach, I realize  
your example didn't call for it, and you're probably already using  
that strategy in your production code, but I thought I'd mention it  
in case it would help somebody watching the discussion.


On Jun 1, 2009, at 3:35 PM, Tim Meagher wrote:

Hi Shannon,

Thanks, and yes, I like the modularized approach too!

Tim


From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com 
>  [mailto:general-boun...@developer.marklogic.com] On Behalf Of  
Shannon

Sent: Monday, June 01, 2009 3:32 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Building cts:search queries  
withconditional logic


Hi, Tim,

I've always had great results using simply the empty sequence.  I'd  
be interested to know if there is any advantage to using  
cts:query(()).


Also, since this is not reflected in your example, just in case,  
I'd like to suggest modularizing it a bit, for far easier reading  
and maintenance--After initializing your variables with a series of  
a let assignments, create a combined cts:query by calling other  
functions, like so:


let $combined-query := cts:and-query((
if ($foo) then search:qry1(...) else (),
if ($bar) then search:qry2(...) else (),
...
))

The search:qry* functions would return a cts:query type --  
basically breaking down each field or fieldset of your form, or  
some other logical grouping, into separate functions.  Then call  
cts:search(input(), cts:combined-query)


Best,

On Jun 1, 2009, at 3:02 PM, Tim Meagher wrote:



Hi Folks,



Is there a preferred way to build a series of cts:search  
constructor functions when using conditional (and/or) logic?  In  
the following example I insert a cts:query() if an value is blank,  
in the other I insert an empty sequence:




cts:search(

  //Record,

  cts:and-query ((

if ($publisher ne "") then

  cts:element-value-query(xs:QName("Publisher"), $publisher,

("case-insensitive", "diacritic-insensitive", "punctuation- 
insensitive")


  )

else cts:query(),

if ($title ne "") then

  cts:element-value-query(xs:QName("Title"), $title,

("case-insensitive", "diacritic-insensitive", "punctuation- 
insensitive")


  )

else ()

  ))

)



Is there a rule for using cts:query() or the empty sequence () for  
dynamically building cts:search constructors?




Thanks again,



Tim


_______
General mailing list
General@developer.marklogic.com<mailto:General@developer.marklogic.com 
>

http://xqzone.com/mailman/listinfo/general


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu<mailto:shifl...@virginia.edu>Tel:  
+1 434 924 4495

Web: http://rotunda.upress.virginia.edu/

_______
General mailing list
General@developer.marklogic.com<mailto:General@developer.marklogic.com 
>

http://xqzone.com/mailman/listinfo/general

--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu<mailto:shifl...@virginia.edu>Tel:  
+1 434 924 4495

Web: http://rotunda.upress.virginia.edu/




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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


Re: [MarkLogic Dev General] Building cts:search queries withconditional logic

2009-06-01 Thread Shannon
I'm watching to see if ML has an opinion on your () vs. cts:query(())  
question!  As to the modularized approach, I realize your example  
didn't call for it, and you're probably already using that strategy in  
your production code, but I thought I'd mention it in case it would  
help somebody watching the discussion.


On Jun 1, 2009, at 3:35 PM, Tim Meagher wrote:


Hi Shannon,

Thanks, and yes, I like the modularized approach too!

Tim

From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com 
] On Behalf Of Shannon

Sent: Monday, June 01, 2009 3:32 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Building cts:search queries  
withconditional logic


Hi, Tim,

I've always had great results using simply the empty sequence.  I'd  
be interested to know if there is any advantage to using  
cts:query(()).


Also, since this is not reflected in your example, just in case, I'd  
like to suggest modularizing it a bit, for far easier reading and  
maintenance--After initializing your variables with a series of a  
let assignments, create a combined cts:query by calling other  
functions, like so:


let $combined-query := cts:and-query((
if ($foo) then search:qry1(...) else (),
if ($bar) then search:qry2(...) else (),
...
))

The search:qry* functions would return a cts:query type -- basically  
breaking down each field or fieldset of your form, or some other  
logical grouping, into separate functions.  Then call  
cts:search(input(), cts:combined-query)


Best,

On Jun 1, 2009, at 3:02 PM, Tim Meagher wrote:


Hi Folks,

Is there a preferred way to build a series of cts:search constructor  
functions when using conditional (and/or) logic?  In the following  
example I insert a cts:query() if an value is blank, in the other I  
insert an empty sequence:


cts:search(
  //Record,
  cts:and-query ((
if ($publisher ne "") then
  cts:element-value-query(xs:QName("Publisher"), $publisher,
("case-insensitive", "diacritic-insensitive", "punctuation- 
insensitive")

  )
else cts:query(),
if ($title ne "") then
  cts:element-value-query(xs:QName("Title"), $title,
("case-insensitive", "diacritic-insensitive", "punctuation- 
insensitive")

  )
else ()
  ))
)

Is there a rule for using cts:query() or the empty sequence () for  
dynamically building cts:search constructors?


Thanks again,

Tim

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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


--
Shannon Scott Shiflett, XML Programmer
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: shifl...@virginia.edu   Tel: +1 434 924 4495
Web: http://rotunda.upress.virginia.edu/

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


  1   2   >