[MarkLogic Dev General] Does adding a document to a collection trigger a CPF domain?

2013-08-20 Thread Tim
Hi Folks,

 

I have some documents in a directory URI with a CPF domain tied to trigger
actions whenever a document is inserted or updated in that directory URI.  I
would like to add the documents in this directory URI to a collection (which is
more like adding a collection to the document). Will this trigger the CPF
actions even though I'm not changing any content in the document?

 

Thank you!

 

Tim Meagher

 

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


Re: [MarkLogic Dev General] Higher relevance for newer documents?

2013-08-20 Thread Ron Hitchens

   Parents of young children know what I'm talkin' 'bout.

---
Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212

On Aug 20, 2013, at 8:59 PM, David Lee  wrote:

> Sorry but that was BAA
> 
> Sent from my iPad (excuse the terseness) 
> David A Lee
> d...@marklogic.com
> 812-630-7622
> 
> 
> On Aug 20, 2013, at 3:53 PM, "Ron Hitchens"  wrote:
> 
>> 
>> ---
>> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
>> 
>> 
>> On Aug 20, 2013, at 7:26 PM, Jason Hunter  wrote:
>> 
>>> MarkMail did #1 but has the downside as you list. You can eliminate the 
>>> downside by upping quality over time and adjusting down the quality weight 
>>> on the search. (That assumes you don't have any other factors in the 
>>> quality calculation except recency.) Maybe once in a while reset things 
>>> globally so the numbers don't get ridiculous. 
>>> 
>>> MarkLogic 7 adds scoring to range index values, which is what you really 
>>> want.
>> 
>>  I'll take it.  But I've got to get to 6 before I can get to 7.
>> 
>>  Why was MarkLogic 6 afraid of MarkLogic 7?  Because 7 8 9.
>> 
>>  Sorry.
>> 
>>> Sent from my iPhone
>>> 
>>> On Aug 20, 2013, at 11:10 AM, Ron Hitchens  wrote:
>>> 
 
 What are the techniques out there for giving newer documents 
 higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
 play before long.
 
 There are two schemes that I am aware of, neither of which feels
 very elegant:
 
 1) Give documents a high quality value when ingested.  Periodically
 crawl the content and for any document with positive quality, reduce
 its quality according to some algorithm until the quality reaches zero.
 
 This gives the best control over "freshness", but has the disadvantage
 of causing potentially large numbers of updates on each pass with the
 attendant merges and disk I/O & CPU load.
 
 2) Replicate the "real" query n times, each and-ed with a time-based
 query against the insertion date.  All of these are or-ed together
 with descending weights for older dates.
 
 This does't require changing documents to tweak their freshness.  But
 it also means you have a stair-step function of n-steps, which may not
 be very precise - and which wouldn't scale very well for large values
 of n.  And unfortunately, since the queries would be time-based, you
 can't pre-register them ahead of time.
 
 Any other clever techniques that you've used?
 
 ---
 Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
 
 
 
 
 ___
 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] Higher relevance for newer documents?

2013-08-20 Thread Ron Hitchens

   Because your quality value would have to be exponentially
increasing over time.  As you move up the increasingly vertical
curve, you'll soon shoot past the magnitude of a 32 bit number.

   What you really want is for the curve to fall quickly into
the past from now, then level off the further back you go.  You'd
want that curve to be computed relative to the query time, not the
ingestion time.

   You could do the exponential thing if you constantly crawl the
content and re-adjust the quality values.  But not if you stick a
constant number on the document that doesn't change over its lifetime.

---
Ron Hitchens {mailto:r...@ronsoft.com}   Ronsoft Technologies
 +44 7879 358 212 (voice)  http://www.ronsoft.com
 +1 707 924 3878 (fax)  Bit Twiddling At Its Finest
"No amount of belief establishes any fact." -Unknown

On Aug 20, 2013, at 8:48 PM, David Gorbet  wrote:

> Why couldn't you do an exponential decay? You control the formula, right? It 
> could be (weeks-since-1970)^2, couldn't it?
> 
> Sent from my Windows Phone
> From: Ron Hitchens
> Sent: ‎8/‎20/‎2013 12:46 PM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Higher relevance for newer documents?
> 
> 
>Thanks Mike.  I'd looked at a similar idea involving the
> copyright year (that was too coarse).  The number of weeks
> since some distant date is a pretty good idea.
> 
>I suppose the biggest weakness of this algorithm is that it
> is necessarily linear.  You can't do an exponential decay where
> the quality of recent document drops off quickly and then levels
> of as they get older.  Though linear is better than nothing.
> 
>Is there any downside to constantly increasing quality values?
> The quality argument of xdmp:set-document-quality is a 32-bit xs:int.
> Is the relevance boost from quality applied evenly across the range
> of possible values?
> 
>Thanks.
> 
> ---
> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
> 
> 
> On Aug 20, 2013, at 7:20 PM, Michael Blakeley  wrote:
> 
> > What about using a naturally-increasing number for quality?
> > 
> > For example the number of weeks since 1970:
> > 
> >xs:integer(
> >  (current-date() - xs:date('1970-01-01'))
> >   div xs:dayTimeDuration("P7D"))
> >=> 531
> > 
> > You can reduce the magnitude of the quality boost by increasing the bucket 
> > size: 14D, 30D, etc. Or changing the start-date might also be useful.
> > 
> > No crawl is necessary, unless you change your mind about the boost 
> > algorithm.
> > 
> > -- Mike
> > 
> > On 20 Aug 2013, at 11:10 , Ron Hitchens  wrote:
> > 
> >> 
> >>  What are the techniques out there for giving newer documents 
> >> higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
> >> play before long.
> >> 
> >>  There are two schemes that I am aware of, neither of which feels
> >> very elegant:
> >> 
> >> 1) Give documents a high quality value when ingested.  Periodically
> >> crawl the content and for any document with positive quality, reduce
> >> its quality according to some algorithm until the quality reaches zero.
> >> 
> >>  This gives the best control over "freshness", but has the disadvantage
> >> of causing potentially large numbers of updates on each pass with the
> >> attendant merges and disk I/O & CPU load.
> >> 
> >> 2) Replicate the "real" query n times, each and-ed with a time-based
> >> query against the insertion date.  All of these are or-ed together
> >> with descending weights for older dates.
> >> 
> >>  This does't require changing documents to tweak their freshness.  But
> >> it also means you have a stair-step function of n-steps, which may not
> >> be very precise - and which wouldn't scale very well for large values
> >> of n.  And unfortunately, since the queries would be time-based, you
> >> can't pre-register them ahead of time.
> >> 
> >>  Any other clever techniques that you've used?
> >> 
> >> ---
> >> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
> >> 
> >> 
> >> 
> >> 
> >> ___
> >> 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] Higher relevance for newer documents?

2013-08-20 Thread David Lee
Sorry but that was BAA

Sent from my iPad (excuse the terseness) 
David A Lee
d...@marklogic.com
812-630-7622


On Aug 20, 2013, at 3:53 PM, "Ron Hitchens"  wrote:

> 
> ---
> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
> 
> 
> On Aug 20, 2013, at 7:26 PM, Jason Hunter  wrote:
> 
>> MarkMail did #1 but has the downside as you list. You can eliminate the 
>> downside by upping quality over time and adjusting down the quality weight 
>> on the search. (That assumes you don't have any other factors in the quality 
>> calculation except recency.) Maybe once in a while reset things globally so 
>> the numbers don't get ridiculous. 
>> 
>> MarkLogic 7 adds scoring to range index values, which is what you really 
>> want.
> 
>   I'll take it.  But I've got to get to 6 before I can get to 7.
> 
>   Why was MarkLogic 6 afraid of MarkLogic 7?  Because 7 8 9.
> 
>   Sorry.
> 
>> Sent from my iPhone
>> 
>> On Aug 20, 2013, at 11:10 AM, Ron Hitchens  wrote:
>> 
>>> 
>>> What are the techniques out there for giving newer documents 
>>> higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
>>> play before long.
>>> 
>>> There are two schemes that I am aware of, neither of which feels
>>> very elegant:
>>> 
>>> 1) Give documents a high quality value when ingested.  Periodically
>>> crawl the content and for any document with positive quality, reduce
>>> its quality according to some algorithm until the quality reaches zero.
>>> 
>>> This gives the best control over "freshness", but has the disadvantage
>>> of causing potentially large numbers of updates on each pass with the
>>> attendant merges and disk I/O & CPU load.
>>> 
>>> 2) Replicate the "real" query n times, each and-ed with a time-based
>>> query against the insertion date.  All of these are or-ed together
>>> with descending weights for older dates.
>>> 
>>> This does't require changing documents to tweak their freshness.  But
>>> it also means you have a stair-step function of n-steps, which may not
>>> be very precise - and which wouldn't scale very well for large values
>>> of n.  And unfortunately, since the queries would be time-based, you
>>> can't pre-register them ahead of time.
>>> 
>>> Any other clever techniques that you've used?
>>> 
>>> ---
>>> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> 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] Higher relevance for newer documents?

2013-08-20 Thread Ron Hitchens

---
Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212


On Aug 20, 2013, at 7:26 PM, Jason Hunter  wrote:

> MarkMail did #1 but has the downside as you list. You can eliminate the 
> downside by upping quality over time and adjusting down the quality weight on 
> the search. (That assumes you don't have any other factors in the quality 
> calculation except recency.) Maybe once in a while reset things globally so 
> the numbers don't get ridiculous. 
> 
> MarkLogic 7 adds scoring to range index values, which is what you really 
> want. 

   I'll take it.  But I've got to get to 6 before I can get to 7.

   Why was MarkLogic 6 afraid of MarkLogic 7?  Because 7 8 9.

   Sorry.

> Sent from my iPhone
> 
> On Aug 20, 2013, at 11:10 AM, Ron Hitchens  wrote:
> 
>> 
>>  What are the techniques out there for giving newer documents 
>> higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
>> play before long.
>> 
>>  There are two schemes that I am aware of, neither of which feels
>> very elegant:
>> 
>> 1) Give documents a high quality value when ingested.  Periodically
>> crawl the content and for any document with positive quality, reduce
>> its quality according to some algorithm until the quality reaches zero.
>> 
>>  This gives the best control over "freshness", but has the disadvantage
>> of causing potentially large numbers of updates on each pass with the
>> attendant merges and disk I/O & CPU load.
>> 
>> 2) Replicate the "real" query n times, each and-ed with a time-based
>> query against the insertion date.  All of these are or-ed together
>> with descending weights for older dates.
>> 
>>  This does't require changing documents to tweak their freshness.  But
>> it also means you have a stair-step function of n-steps, which may not
>> be very precise - and which wouldn't scale very well for large values
>> of n.  And unfortunately, since the queries would be time-based, you
>> can't pre-register them ahead of time.
>> 
>>  Any other clever techniques that you've used?
>> 
>> ---
>> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
>> 
>> 
>> 
>> 
>> ___
>> 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] Higher relevance for newer documents?

2013-08-20 Thread David Gorbet
Why couldn't you do an exponential decay? You control the formula, right? It 
could be (weeks-since-1970)^2, couldn't it?

Sent from my Windows Phone

From: Ron Hitchens
Sent: ‎8/‎20/‎2013 12:46 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Higher relevance for newer documents?


   Thanks Mike.  I'd looked at a similar idea involving the
copyright year (that was too coarse).  The number of weeks
since some distant date is a pretty good idea.

   I suppose the biggest weakness of this algorithm is that it
is necessarily linear.  You can't do an exponential decay where
the quality of recent document drops off quickly and then levels
of as they get older.  Though linear is better than nothing.

   Is there any downside to constantly increasing quality values?
The quality argument of xdmp:set-document-quality is a 32-bit xs:int.
Is the relevance boost from quality applied evenly across the range
of possible values?

   Thanks.

---
Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212


On Aug 20, 2013, at 7:20 PM, Michael Blakeley  wrote:

> What about using a naturally-increasing number for quality?
>
> For example the number of weeks since 1970:
>
>xs:integer(
>  (current-date() - xs:date('1970-01-01'))
>   div xs:dayTimeDuration("P7D"))
>=> 531
>
> You can reduce the magnitude of the quality boost by increasing the bucket 
> size: 14D, 30D, etc. Or changing the start-date might also be useful.
>
> No crawl is necessary, unless you change your mind about the boost algorithm.
>
> -- Mike
>
> On 20 Aug 2013, at 11:10 , Ron Hitchens  wrote:
>
>>
>>  What are the techniques out there for giving newer documents
>> higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
>> play before long.
>>
>>  There are two schemes that I am aware of, neither of which feels
>> very elegant:
>>
>> 1) Give documents a high quality value when ingested.  Periodically
>> crawl the content and for any document with positive quality, reduce
>> its quality according to some algorithm until the quality reaches zero.
>>
>>  This gives the best control over "freshness", but has the disadvantage
>> of causing potentially large numbers of updates on each pass with the
>> attendant merges and disk I/O & CPU load.
>>
>> 2) Replicate the "real" query n times, each and-ed with a time-based
>> query against the insertion date.  All of these are or-ed together
>> with descending weights for older dates.
>>
>>  This does't require changing documents to tweak their freshness.  But
>> it also means you have a stair-step function of n-steps, which may not
>> be very precise - and which wouldn't scale very well for large values
>> of n.  And unfortunately, since the queries would be time-based, you
>> can't pre-register them ahead of time.
>>
>>  Any other clever techniques that you've used?
>>
>> ---
>> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
>>
>>
>>
>>
>> ___
>> 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] Higher relevance for newer documents?

2013-08-20 Thread Ron Hitchens

   Thanks Mike.  I'd looked at a similar idea involving the
copyright year (that was too coarse).  The number of weeks
since some distant date is a pretty good idea.

   I suppose the biggest weakness of this algorithm is that it
is necessarily linear.  You can't do an exponential decay where
the quality of recent document drops off quickly and then levels
of as they get older.  Though linear is better than nothing.

   Is there any downside to constantly increasing quality values?
The quality argument of xdmp:set-document-quality is a 32-bit xs:int.
Is the relevance boost from quality applied evenly across the range
of possible values?

   Thanks.

---
Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212


On Aug 20, 2013, at 7:20 PM, Michael Blakeley  wrote:

> What about using a naturally-increasing number for quality?
> 
> For example the number of weeks since 1970:
> 
>xs:integer(
>  (current-date() - xs:date('1970-01-01'))
>   div xs:dayTimeDuration("P7D"))
>=> 531
> 
> You can reduce the magnitude of the quality boost by increasing the bucket 
> size: 14D, 30D, etc. Or changing the start-date might also be useful.
> 
> No crawl is necessary, unless you change your mind about the boost algorithm.
> 
> -- Mike
> 
> On 20 Aug 2013, at 11:10 , Ron Hitchens  wrote:
> 
>> 
>>  What are the techniques out there for giving newer documents 
>> higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
>> play before long.
>> 
>>  There are two schemes that I am aware of, neither of which feels
>> very elegant:
>> 
>> 1) Give documents a high quality value when ingested.  Periodically
>> crawl the content and for any document with positive quality, reduce
>> its quality according to some algorithm until the quality reaches zero.
>> 
>>  This gives the best control over "freshness", but has the disadvantage
>> of causing potentially large numbers of updates on each pass with the
>> attendant merges and disk I/O & CPU load.
>> 
>> 2) Replicate the "real" query n times, each and-ed with a time-based
>> query against the insertion date.  All of these are or-ed together
>> with descending weights for older dates.
>> 
>>  This does't require changing documents to tweak their freshness.  But
>> it also means you have a stair-step function of n-steps, which may not
>> be very precise - and which wouldn't scale very well for large values
>> of n.  And unfortunately, since the queries would be time-based, you
>> can't pre-register them ahead of time.
>> 
>>  Any other clever techniques that you've used?
>> 
>> ---
>> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
>> 
>> 
>> 
>> 
>> ___
>> 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] Higher relevance for newer documents?

2013-08-20 Thread Jason Hunter
MarkMail did #1 but has the downside as you list. You can eliminate the 
downside by upping quality over time and adjusting down the quality weight on 
the search. (That assumes you don't have any other factors in the quality 
calculation except recency.) Maybe once in a while reset things globally so the 
numbers don't get ridiculous. 

MarkLogic 7 adds scoring to range index values, which is what you really want. 

Sent from my iPhone

On Aug 20, 2013, at 11:10 AM, Ron Hitchens  wrote:

> 
>   What are the techniques out there for giving newer documents 
> higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
> play before long.
> 
>   There are two schemes that I am aware of, neither of which feels
> very elegant:
> 
> 1) Give documents a high quality value when ingested.  Periodically
> crawl the content and for any document with positive quality, reduce
> its quality according to some algorithm until the quality reaches zero.
> 
>   This gives the best control over "freshness", but has the disadvantage
> of causing potentially large numbers of updates on each pass with the
> attendant merges and disk I/O & CPU load.
> 
> 2) Replicate the "real" query n times, each and-ed with a time-based
> query against the insertion date.  All of these are or-ed together
> with descending weights for older dates.
> 
>   This does't require changing documents to tweak their freshness.  But
> it also means you have a stair-step function of n-steps, which may not
> be very precise - and which wouldn't scale very well for large values
> of n.  And unfortunately, since the queries would be time-based, you
> can't pre-register them ahead of time.
> 
>   Any other clever techniques that you've used?
> 
> ---
> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
> 
> 
> 
> 
> ___
> 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] Higher relevance for newer documents?

2013-08-20 Thread Michael Blakeley
What about using a naturally-increasing number for quality?

For example the number of weeks since 1970:

xs:integer(
  (current-date() - xs:date('1970-01-01'))
   div xs:dayTimeDuration("P7D"))
=> 531

You can reduce the magnitude of the quality boost by increasing the bucket 
size: 14D, 30D, etc. Or changing the start-date might also be useful.

No crawl is necessary, unless you change your mind about the boost algorithm.

-- Mike

On 20 Aug 2013, at 11:10 , Ron Hitchens  wrote:

> 
>   What are the techniques out there for giving newer documents 
> higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
> play before long.
> 
>   There are two schemes that I am aware of, neither of which feels
> very elegant:
> 
> 1) Give documents a high quality value when ingested.  Periodically
> crawl the content and for any document with positive quality, reduce
> its quality according to some algorithm until the quality reaches zero.
> 
>   This gives the best control over "freshness", but has the disadvantage
> of causing potentially large numbers of updates on each pass with the
> attendant merges and disk I/O & CPU load.
> 
> 2) Replicate the "real" query n times, each and-ed with a time-based
> query against the insertion date.  All of these are or-ed together
> with descending weights for older dates.
> 
>   This does't require changing documents to tweak their freshness.  But
> it also means you have a stair-step function of n-steps, which may not
> be very precise - and which wouldn't scale very well for large values
> of n.  And unfortunately, since the queries would be time-based, you
> can't pre-register them ahead of time.
> 
>   Any other clever techniques that you've used?
> 
> ---
> Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212
> 
> 
> 
> 
> ___
> 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] Higher relevance for newer documents?

2013-08-20 Thread Ron Hitchens

   What are the techniques out there for giving newer documents 
higher relevance?  My target is MarkLogic 5.x, but 6.x may be in
play before long.

   There are two schemes that I am aware of, neither of which feels
very elegant:

1) Give documents a high quality value when ingested.  Periodically
crawl the content and for any document with positive quality, reduce
its quality according to some algorithm until the quality reaches zero.

   This gives the best control over "freshness", but has the disadvantage
of causing potentially large numbers of updates on each pass with the
attendant merges and disk I/O & CPU load.

2) Replicate the "real" query n times, each and-ed with a time-based
query against the insertion date.  All of these are or-ed together
with descending weights for older dates.

   This does't require changing documents to tweak their freshness.  But
it also means you have a stair-step function of n-steps, which may not
be very precise - and which wouldn't scale very well for large values
of n.  And unfortunately, since the queries would be time-based, you
can't pre-register them ahead of time.

   Any other clever techniques that you've used?

---
Ron Hitchens {r...@overstory.co.uk}  +44 7879 358212




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


Re: [MarkLogic Dev General] How to check my file will get process or not

2013-08-20 Thread Singh, Gurbeer
User will upload a file with some meta data , this file can be a good file or 
bad file[password protected/corrupted]

I need to save this file in my ML data base in XML format. If a file is a bad 
file, in that case I need to save only meta data .

We have written a pipeline to process this. If user submit a doc in a ML folder 
[where pipeline is attach] i check weather I am able to extract XML from user 
document xdmp:document-filter(fn:doc($cpf:document-uri)), if Yes I insert a new 
document ( meta data + extracted XML) in my ML search folder, If no I need to 
save only metadata.

~Gurbeer

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of David Lee
Sent: Tuesday, August 20, 2013 1:36 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] How to check my file will get process or 
not

Could you explain in more detail what you mean by a password protected file ?
Are you refering to WebDav authentication or something else ?


-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com

From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Singh, Gurbeer
Sent: Tuesday, August 20, 2013 1:34 PM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] How to check my file will get process or not

Is there any way to check weather my file will get process or not.

For example If a file is password protected, it turns to error state, and I am 
unable to do anything after that.

Basically my requirement is , if a file is password protected , process only 
metadata[User will pass meta data with each file] no need to process original 
file, but how to check that.

In my pipeline , I am trying to do some like this

declare variable $filtered_document as xs:string := try { 
xdmp:document-filter(fn:doc($cpf:document-uri))} catch($e) {};

if file is password protected it went to catch, and change to state error .. 
on-state-enter, after that I am unable to do anything.


~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.




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
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] How to check my file will get process or not

2013-08-20 Thread Singh, Gurbeer
It could be PDF or DOC/x, but meta data will be in XML format


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of David Lee
Sent: Tuesday, August 20, 2013 1:45 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] How to check my file will get process or 
not

I am sorry to be obtuse, but what kind of file are you using that could be 
password protected or corrupted ?
Is this a ZIP file ? a PDF ? ... XML files dont have password protection.
I think I am missing a bit of your workflow so having a hard time answering.


-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com

From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Singh, Gurbeer
Sent: Tuesday, August 20, 2013 1:42 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] How to check my file will get process or 
not

User will upload a file with some meta data , this file can be a good file or 
bad file[password protected/corrupted]

I need to save this file in my ML data base in XML format. If a file is a bad 
file, in that case I need to save only meta data .

We have written a pipeline to process this. If user submit a doc in a ML folder 
[where pipeline is attach] i check weather I am able to extract XML from user 
document xdmp:document-filter(fn:doc($cpf:document-uri)), if Yes I insert a new 
document ( meta data + extracted XML) in my ML search folder, If no I need to 
save only metadata.

~Gurbeer


From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of David Lee
Sent: Tuesday, August 20, 2013 1:36 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] How to check my file will get process or 
not

Could you explain in more detail what you mean by a password protected file ?
Are you refering to WebDav authentication or something else ?


-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com

From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Singh, Gurbeer
Sent: Tuesday, August 20, 2013 1:34 PM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] How to check my file will get process or not

Is there any way to check weather my file will get process or not.

For example If a file is password protected, it turns to error state, and I am 
unable to do anything after that.

Basically my requirement is , if a file is password protected , process only 
metadata[User will pass meta data with each file] no need to process original 
file, but how to check that.

In my pipeline , I am trying to do some like this

declare variable $filtered_document as xs:string := try { 
xdmp:document-filter(fn:doc($cpf:document-uri))} catch($e) {};

if file is password protected it went to catch, and change to state error .. 
on-state-enter, after that I am unable to do anything.


~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.



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 Stanle

Re: [MarkLogic Dev General] How to check my file will get process or not

2013-08-20 Thread David Lee
I am sorry to be obtuse, but what kind of file are you using that could be 
password protected or corrupted ?
Is this a ZIP file ? a PDF ? ... XML files dont have password protection.
I think I am missing a bit of your workflow so having a hard time answering.


-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Singh, Gurbeer
Sent: Tuesday, August 20, 2013 1:42 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] How to check my file will get process or 
not

User will upload a file with some meta data , this file can be a good file or 
bad file[password protected/corrupted]

I need to save this file in my ML data base in XML format. If a file is a bad 
file, in that case I need to save only meta data .

We have written a pipeline to process this. If user submit a doc in a ML folder 
[where pipeline is attach] i check weather I am able to extract XML from user 
document xdmp:document-filter(fn:doc($cpf:document-uri)), if Yes I insert a new 
document ( meta data + extracted XML) in my ML search folder, If no I need to 
save only metadata.

~Gurbeer


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of David Lee
Sent: Tuesday, August 20, 2013 1:36 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] How to check my file will get process or 
not

Could you explain in more detail what you mean by a password protected file ?
Are you refering to WebDav authentication or something else ?


-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com

From: 
general-boun...@developer.marklogic.com
 [mailto:general-boun...@developer.marklogic.com] On Behalf Of Singh, Gurbeer
Sent: Tuesday, August 20, 2013 1:34 PM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] How to check my file will get process or not

Is there any way to check weather my file will get process or not.

For example If a file is password protected, it turns to error state, and I am 
unable to do anything after that.

Basically my requirement is , if a file is password protected , process only 
metadata[User will pass meta data with each file] no need to process original 
file, but how to check that.

In my pipeline , I am trying to do some like this

declare variable $filtered_document as xs:string := try { 
xdmp:document-filter(fn:doc($cpf:document-uri))} catch($e) {};

if file is password protected it went to catch, and change to state error .. 
on-state-enter, after that I am unable to do anything.


~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.



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@d

Re: [MarkLogic Dev General] How to check my file will get process or not

2013-08-20 Thread David Lee
Could you explain in more detail what you mean by a password protected file ?
Are you refering to WebDav authentication or something else ?


-
David Lee
Lead Engineer
MarkLogic Corporation
d...@marklogic.com
Phone: +1 812-482-5224
Cell:  +1 812-630-7622
www.marklogic.com


From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Singh, Gurbeer
Sent: Tuesday, August 20, 2013 1:34 PM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] How to check my file will get process or not

Is there any way to check weather my file will get process or not.

For example If a file is password protected, it turns to error state, and I am 
unable to do anything after that.

Basically my requirement is , if a file is password protected , process only 
metadata[User will pass meta data with each file] no need to process original 
file, but how to check that.

In my pipeline , I am trying to do some like this

declare variable $filtered_document as xs:string := try { 
xdmp:document-filter(fn:doc($cpf:document-uri))} catch($e) {};

if file is password protected it went to catch, and change to state error .. 
on-state-enter, after that I am unable to do anything.


~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
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] How to check my file will get process or not

2013-08-20 Thread Singh, Gurbeer
Is there any way to check weather my file will get process or not.

For example If a file is password protected, it turns to error state, and I am 
unable to do anything after that.

Basically my requirement is , if a file is password protected , process only 
metadata[User will pass meta data with each file] no need to process original 
file, but how to check that.

In my pipeline , I am trying to do some like this

declare variable $filtered_document as xs:string := try { 
xdmp:document-filter(fn:doc($cpf:document-uri))} catch($e) {};

if file is password protected it went to catch, and change to state error .. 
on-state-enter, after that I am unable to do anything.


~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
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] xdmp:filesystem-file-exists -- Any

2013-08-20 Thread Singh, Gurbeer
Thnx, this is helpful.

~Gurbeer
-Original Message-
From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Gary Vidal
Sent: Tuesday, August 20, 2013 12:38 PM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] xdmp:filesystem-file-exists -- Any

Gurbeer,

You can use xdmp:exists(fn:doc("/yourfile")) or fn:doc-available('/your-file') 
if you want to confirm a document exists in the database. It will resolve from 
index if you have uri index turned on. If you need to check the existence of 
multiple documents, then you can simulate the check similar to something like 
this.

cts:uris((),(),cts:document-query($list-of-uris))[fn:not(. = $list-of-uris)]


Regards,

Gary Vdial

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




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
http://developer.marklogic.com/mailman/listinfo/general


[MarkLogic Dev General] xdmp:filesystem-file-exists -- Any

2013-08-20 Thread Gary Vidal
Gurbeer,

You can use xdmp:exists(fn:doc("/yourfile")) or fn:doc-available('/your-file') 
if you want to confirm a document exists in the database. It will resolve from 
index if you have uri index turned on. If you need to check the existence of 
multiple documents, then you can simulate the check similar to something like 
this.

cts:uris((),(),cts:document-query($list-of-uris))[fn:not(. = $list-of-uris)]


Regards,

Gary Vdial

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


Re: [MarkLogic Dev General] xdmp:filesystem-file-exists -- Any other option

2013-08-20 Thread Ryan Dew
Sorry I was mistaken on the second one. xdmp:uri-is-file:  "Returns true if
a given URI refers to a file which exists on the current application
server. *Only returns true if the modules on the App Server is set to file
system;* always returns false if you are using a database for your modules"

-Ryan


On Tue, Aug 20, 2013 at 10:25 AM, Ryan Dew  wrote:

> You might want to checkout the following
>
> Content DB:
> http://docs.marklogic.com/fn:doc-available
>
> Modules DB:
> http://docs.marklogic.com/xdmp:uri-is-file
>
> -Ryan Dew
>
>
> On Tue, Aug 20, 2013 at 10:04 AM, Singh, Gurbeer <
> gurbeer.si...@morganstanley.com> wrote:
>
>>   I need check, my file exists in ML data base or not , I don’t want to
>> load the fn:doc() and check.
>>
>> ** **
>>
>> xdmp:filesystem-file-exists works only filesystem. It’s not working for
>> my webdav folder created for my ML database.
>>
>> ** **
>>
>> ** **
>>
>> let
>> $path:="/ms/user/g/gurbeers/FPOL_ML_XQY/Policy/MLPortal/services/saveDocAndMetaN.xqy"
>> 
>>
>> return
>>
>> xdmp:filesystem-file-exists($oldpath) (:true:)
>>
>> ** **
>>
>> ** **
>>
>> let $path:="/policies/otherDocs/1702386.xml"
>>
>> return
>>
>> xdmp:filesystem-file-exists($path) (:false:)
>>
>> ** **
>>
>> ** **
>>
>> ~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
>> 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] xdmp:filesystem-file-exists -- Any other option

2013-08-20 Thread Ryan Dew
You might want to checkout the following

Content DB:
http://docs.marklogic.com/fn:doc-available

Modules DB:
http://docs.marklogic.com/xdmp:uri-is-file

-Ryan Dew


On Tue, Aug 20, 2013 at 10:04 AM, Singh, Gurbeer <
gurbeer.si...@morganstanley.com> wrote:

>   I need check, my file exists in ML data base or not , I don’t want to
> load the fn:doc() and check.
>
> ** **
>
> xdmp:filesystem-file-exists works only filesystem. It’s not working for my
> webdav folder created for my ML database.
>
> ** **
>
> ** **
>
> let
> $path:="/ms/user/g/gurbeers/FPOL_ML_XQY/Policy/MLPortal/services/saveDocAndMetaN.xqy"
> 
>
> return
>
> xdmp:filesystem-file-exists($oldpath) (:true:)
>
> ** **
>
> ** **
>
> let $path:="/policies/otherDocs/1702386.xml"
>
> return
>
> xdmp:filesystem-file-exists($path) (:false:)
>
> ** **
>
> ** **
>
> ~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
> 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:filesystem-file-exists -- Any other option

2013-08-20 Thread Singh, Gurbeer
I need check, my file exists in ML data base or not , I don't want to load the 
fn:doc() and check.

xdmp:filesystem-file-exists works only filesystem. It's not working for my 
webdav folder created for my ML database.


let 
$path:="/ms/user/g/gurbeers/FPOL_ML_XQY/Policy/MLPortal/services/saveDocAndMetaN.xqy"
return
xdmp:filesystem-file-exists($oldpath) (:true:)


let $path:="/policies/otherDocs/1702386.xml"
return
xdmp:filesystem-file-exists($path) (:false:)


~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
http://developer.marklogic.com/mailman/listinfo/general


Re: [MarkLogic Dev General] String array

2013-08-20 Thread ASIT.NAUTIYAL
Hi Pragya,

Please find the below query :


let $input :=


  pragya
  kapoor


  pragya
  

  kapoor
  

  amit



let $output := {
for $each in fn:distinct-values($input//q/o)
let $b := $input//q[o[.=$each]]
let $count := count($input//q/o[.=$each])
return {$each}
}
return $output

Regards,
Asit Nautiyal

From: general-boun...@developer.marklogic.com 
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Pragya Kapoor
Sent: Tuesday, August 20, 2013 9:54 AM
To: general@developer.marklogic.com
Subject: [MarkLogic Dev General] String array

Hi,

I  want to do the following:

Input


  pragya
kapoor


  pragya
  

  kapoor
  

  amit
  



Output :

   pragya"
  kapoor"
  amit"



Thanks
Pragya

 CAUTION - Disclaimer *

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely

for the use of the addressee(s). If you are not the intended recipient, please

notify the sender by e-mail and delete the original message. Further, you are 
not

to copy, disclose, or distribute this e-mail or its contents to any other 
person and

any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken

every reasonable precaution to minimize this risk, but is not liable for any 
damage

you may sustain as a result of any virus in this e-mail. You should carry out 
your

own virus checks before opening the e-mail or attachment. Infosys reserves the

right to monitor and review the content of all messages sent to or from this 
e-mail

address. Messages sent to or from this e-mail address may be stored on the

Infosys e-mail system.

***INFOSYS End of Disclaimer INFOSYS***


This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.
___
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general