HI.

Can you please share the information you have for the index you set up on
@mat:date-value ?

Kind Regards,
David


On 9 June 2014 07:17, Amit Kumar Dev <[email protected]> wrote:

> Thanks! Chris,
>
> I can use path range index, but I am having so many elements which are
> causing the same issue.
> I am not sure why my element query with attribute range index is not
> returning proper result.
>
> Query looks fine to me. I also enabled the "word position" and "element
> word position" index then also getting false result in response.
>
> Kindly suggest can we get correct results by using the below query or I
> have to go for path range index.
> Query:
> <cts:and-query>
>                 <cts:element-query>
>                                 <cts:element>mat:employee</cts:element>
>                                 <cts:element-query>
>
> <cts:element>mat:joining</cts:element>
>
> <cts:element>mat:joining-date</cts:element>
>
> <cts:element-attribute-range-query operator="=">
>
> <cts:element>mat:date</cts:element>
>
> <cts:attribute>mat:date-value</cts:attribute>
>                                                                 <cts:value
> xsi:type="xs:date">2010-11-09</cts:value>
>
> </cts:element-attribute-range-query>
>                                 </cts:element-query>
>                 </cts:element-query>
> </cts:and-query>
>
> Thanks and Regards
> Amit Dev
>
> Date: Sat, 7 Jun 2014 15:25:09 -0400
> From: Christopher Hamlin <[email protected]>
> Subject: Re: [MarkLogic Dev General] Element Query with Element
>         attribute range query is not returning proper results
> To: MarkLogic Developer Discussion <[email protected]>
>
> Hi Amit,
>
>
> Can you use a path range index?
>
> I think they were introduced in version 6, and
>
> cts:valid-index-path
> ('/mat:employee/mat:joining/mat:joining-date/mat:date/@mat:date-value',
> fn:true())
>
> returns true for me (in version 7).
>
>
> - Chris
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://developer.marklogic.com/pipermail/general/attachments/20140607/40849761/attachment-0001.html
> Message-ID:
>         <CADX+0Qwtz7oQZZh_ogHyXqt_e=
> [email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> On Sat, Jun 7, 2014 at 3:06 AM, Amit Kumar Dev <[email protected]>
> wrote:
>
> >  Hi,
> >
> >
> >
> > I am trying to search for date element which come under specific
> > hierarchy of elements.
> >
> > I constructed query to get Date element from
> > /mat:employee/mat:joining/mat:joining-date/mat:date/@mat:date-value
> >
> >
> >
> > But I am getting search results for date other than ?2010-11-09?.
> >
> >
> >
> > Below is the query:
> >
> > <cts:and-query>
> >
> >                 <cts:element-query>
> >
> >
> > <cts:element>mat:employee</cts:element>
> >
> >                                 <cts:element-query>
> >
> >
> > <cts:element>mat:joining</cts:element>
> >
> >
> > <cts:element>mat:joining-date</cts:element>
> >
> >
> > <cts:element-attribute-range-query operator="=">
> >
> >
> > <cts:element>mat:date</cts:element>
> >
> >
> > <cts:attribute>mat:date-value</cts:attribute>
> >
> >
> > <cts:value xsi:type="xs:date">2010-11-09</cts:value>
> >
> >
> > </cts:element-attribute-range-query>
> >
> >                                 </cts:element-query>
> >
> >                 </cts:element-query>
> >
> > </cts:and-query>
> >
> >
> >
> > Whether above query is not searching for exact xpath since I have
> > ?mat:date? element for other places also in xml.
> >
> > E.g.
> > /mat:employee/mat:resignation/mat:resignation-date/mat:date/@mat:date-
> > value
> >
> >
> >
> > I am using MarkLogic 6.0 and having proper element attribute range
> > index for ?mat:date?.
> >
> >
> >
>
> **************** 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***
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to