Hey Shiv,

Please send your code and I will see where you are having problem.

Regards,
Indy

On Wed, Sep 14, 2016 at 11:46 PM, Shiv Shankar <shiv.shivshan...@gmail.com>
wrote:

> Hi Indy,
> Thanks for your reply. I added same text to the mimetype-conditions.xqy,
> but saying condition failed.
>
> Can you share your working condition for mime-type as json to my personal
> email shiv.shivshan...@gmail.com?
>
> My condition is below and version is ML8.0-5.5
>
> <condition>
>
> <module>/MarkLogic/cpf/actions/mimetype-condition.xqy</module>
>
> <options xmlns="/MarkLogic/cpf/actions/mimetype-condition.xqy">
>
> <mime-type>application/json</mime-type>
>
> </options></condition>
> Regards
>
>
> On Wed, Sep 14, 2016 at 7:24 AM, <general-requ...@developer.marklogic.com>
> wrote:
>
>> Send General mailing list submissions to
>>         general@developer.marklogic.com
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>         http://developer.marklogic.com/mailman/listinfo/general
>> or, via email, send a message with subject or body 'help' to
>>         general-requ...@developer.marklogic.com
>>
>> You can reach the person managing the list at
>>         general-ow...@developer.marklogic.com
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of General digest..."
>>
>>
>> Today's Topics:
>>
>>    1. Re: modules, conditions to validate JSON documents in CPF
>>       (Indrajeet Verma)
>>    2. index for dateTime comparsion not working properly
>>       (vikas.sin...@cognizant.com)
>>    3. Re: index for dateTime comparsion not working properly
>>       (Mats Stellwall)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Wed, 14 Sep 2016 11:09:00 +0530
>> From: Indrajeet Verma <indrajeet.ve...@gmail.com>
>> Subject: Re: [MarkLogic Dev General] modules, conditions to validate
>>         JSON documents in CPF
>> To: MarkLogic Developer Discussion <general@developer.marklogic.com>
>> Message-ID:
>>         <CAKwHAegS67e=q6xN+68xv_nQ+vJgcLKT6yvOap8KEUkdfiMMTQ@mail.
>> gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hey Shiv,
>>
>> It's working fine to me with json documents as well. If you can send your
>> complete pipeline, I may try to point out issue.
>>
>> You may try to set log level "fine" and can see more granular level logs.
>> You might catch the issues your own.
>>
>> Also you may try adding logs in the xqy module
>> /MarkLogic/cpf/actions/mimetype-condition.xqy and see what content
>> type/mime type is being logged.
>>
>> let $_ := xdmp:log("====content-type=====" || $doc-content-type)
>> let $_ := xdmp:log($mime-type-patterns)
>>
>> Which version of ML are you using?
>>
>> Regards,
>> Indy
>>
>> On Wed, Sep 14, 2016 at 12:04 AM, Shiv Shankar <
>> shiv.shivshan...@gmail.com>
>> wrote:
>>
>> > Hi,
>> > As part of Pipeline definition in Content Processing Framework, I need
>> to
>> > handle JSON documents. I added below lines in the Pipeline file. But it
>> is
>> > unable to call action module. Please advise.'
>> >
>> > Note: added add-something to module. and the given tutorial is working
>> >  for XML content.
>> >
>> > <execute>
>> >
>> > <condition>
>> >
>> > <module>/MarkLogic/cpf/actions/mimetype-condition.xqy</module>
>> >
>> > <options xmlns="/MarkLogic/cpf/actions/mimetype-condition.xqy">
>> >
>> > <mime-type>application/json</mime-type>
>> >
>> > </options>
>> >
>> > </condition>
>> >
>> > <action>
>> >
>> > <module>do-something.xqy</module>
>> >
>> > </action>
>> >
>> > </execute>
>> >
>> >
>> >
>> > _______________________________________________
>> > General mailing list
>> > General@developer.marklogic.com
>> > Manage your subscription at:
>> > http://developer.marklogic.com/mailman/listinfo/general
>> >
>> >
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: http://developer.marklogic.com/pipermail/general/attachments
>> /20160914/8cfb3201/attachment-0001.html
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Wed, 14 Sep 2016 10:54:17 +0000
>> From: <vikas.sin...@cognizant.com>
>> Subject: [MarkLogic Dev General] index for dateTime comparsion not
>>         working properly
>> To: <general@developer.marklogic.com>
>> Message-ID:
>>         <883d8ff057fe8c47a77a6cf0b932c87f3fdb7...@ctsinchnsxmbs.cts.com>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Hi All,
>>
>> DateTime index in not working properly  while writing json query. I have
>> created element range index  for accessedTime.
>>
>> Example: We have content like as.
>> {
>> "audit": {
>> "accessedTime": "2016-09-14T06:04:00",
>> "data": {
>> "entries": [
>> {
>> "name": "reportType",
>> "value": "Download"
>> }
>> ]
>> },
>> "userName": "genuser",
>> "groups": {
>> "groupNames": [
>> "Test",
>> "Test2"
>> ]
>> },
>> "identifier": "9695071722831412392"
>> }
>> }
>>
>> When I am writing  a query like
>>
>>   let $from-date := "2016-09-13T00:00:00"
>>   let $to-date := "2016-09-14T00:00:00"
>>   let $query := cts:and-query((
>>                            cts:json-property-range-query("accessedTime",">=",
>> xs:dateTime($from-date)),
>>                            cts:json-property-range-query("accessedTime","<=",
>> xs:dateTime($to-date))))
>> return cts:search(fn:doc(),$query)
>>
>> Above query is not returning anything but when I am changing  to-date
>> parameter to "2016-09-15T00:00:00",  I am getting result. It looks like
>> comparison is not working for operator "<=" .
>>
>> Regards,
>> Vikas Singh
>> 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. Where permitted by
>> applicable law, this e-mail and other e-mail communications sent to and
>> from Cognizant e-mail addresses may be monitored.
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: http://developer.marklogic.com/pipermail/general/attachments
>> /20160914/8e14c95d/attachment-0001.html
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Wed, 14 Sep 2016 11:24:30 +0000
>> From: Mats Stellwall <mats.stellw...@marklogic.com>
>> Subject: Re: [MarkLogic Dev General] index for dateTime comparsion not
>>         working properly
>> To: MarkLogic Developer Discussion <general@developer.marklogic.com>
>> Message-ID: <dc4e2bca-51a0-474c-9e25-2ec75f35c...@marklogic.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hi,
>>
>> Is not 2016-09-14T06:04:00 greater than 2016-09-14T00:00:00?
>>
>> So the 2016-09-14T06:04:00  <= 2016-09-14T00:00:00 will be false.
>>
>> If you do 2016-09-14T23:59:59 as the maximum you would get a hit.
>>
>> Kind regards,
>> Mats
>>
>> Mats Stellwall
>> Principal Sales Engineer ? Partners/Channels EMEA
>> MarkLogic Corporation
>> mats.stellw...@marklogic.com<mailto:mats.stellw...@marklogic.com>
>> Cell: +46 70 604 55 11
>> www.marklogic.com<http://www.marklogic.com/>
>> Stay Connected
>>
>> Follow me @MatsStellwall<http://twitter.com/MatsStellwall> on Twitter
>>
>>
>> Link with me Mats Stellwall<http://se.linkedin.com/in/matsstellwall/> at
>> LinkedIn
>>
>>
>> Read my blogg at nosqlbloggen.se<http://nosqlbloggen.se/>
>>
>>
>>
>>
>>
>> From: <general-boun...@developer.marklogic.com> on behalf of "
>> vikas.sin...@cognizant.com" <vikas.sin...@cognizant.com>
>> Reply-To: MarkLogic Developer Discussion <general@developer.marklogic.com
>> >
>> Date: Wednesday 14 September 2016 at 12:54
>> To: "general@developer.marklogic.com" <general@developer.marklogic.com>
>> Subject: [MarkLogic Dev General] index for dateTime comparsion not
>> working properly
>>
>> Hi All,
>>
>> DateTime index in not working properly  while writing json query. I have
>> created element range index  for accessedTime.
>>
>> Example: We have content like as.
>> {
>> "audit": {
>> "accessedTime": "2016-09-14T06:04:00",
>> "data": {
>> "entries": [
>> {
>> "name": "reportType",
>> "value": "Download"
>> }
>> ]
>> },
>> "userName": "genuser",
>> "groups": {
>> "groupNames": [
>> "Test",
>> ?Test2?
>> ]
>> },
>> "identifier": "9695071722831412392"
>> }
>> }
>>
>> When I am writing  a query like
>>
>>   let $from-date := "2016-09-13T00:00:00"
>>   let $to-date := "2016-09-14T00:00:00"
>>   let $query := cts:and-query((
>>                            cts:json-property-range-query("accessedTime",">=",
>> xs:dateTime($from-date)),
>>                            cts:json-property-range-query("accessedTime","<=",
>> xs:dateTime($to-date))))
>> return cts:search(fn:doc(),$query)
>>
>> Above query is not returning anything but when I am changing  to-date
>> parameter to ?2016-09-15T00:00:00?,  I am getting result. It looks like
>> comparison is not working for operator ?<=? .
>>
>> Regards,
>> Vikas Singh
>> 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. Where permitted by
>> applicable law, this e-mail and other e-mail communications sent to and
>> from Cognizant e-mail addresses may be monitored.
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: http://developer.marklogic.com/pipermail/general/attachments
>> /20160914/1bc8e63c/attachment.html
>>
>> ------------------------------
>>
>> _______________________________________________
>> General mailing list
>> General@developer.marklogic.com
>> Manage your subscription at:
>> http://developer.marklogic.com/mailman/listinfo/general
>>
>>
>> End of General Digest, Vol 147, Issue 16
>> ****************************************
>>
>
>
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to