Danny

Thanks for pointing to the right direction...attribute value positions 
index was missing..Its done. :)

Abhishek Srivastav
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________



From:
Danny Sokolsky <[email protected]>
To:
General MarkLogic Developer Discussion <[email protected]>
Date:
08/30/2011 09:49 PM
Subject:
Re: [MarkLogic Dev General] Issue with element-attribute-value  with query
Sent by:
[email protected]



Try enabling the ?word positions? and ?element word positions? index 
options in your database (this will cause a reindex).
 
-Danny
 
From: [email protected] [
mailto:[email protected]] On Behalf Of Abhishek53 S
Sent: Tuesday, August 30, 2011 8:17 AM
To: General MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Issue with element-attribute-value 
with query
 

Gajanan 

Yes it is returning the document from which element-attribute-values are 
coming..Now if this is the case I need element-attribute-value with 
"filtered" kind of approach..The default options of 
element-attribute-value with not provide this. Is there any way to achieve 
the same by changing the query portion of  element-attribute-query. 


Thanks for reply. 

Abhishek Srivastav
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
Website: http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________ 


From: 
Gajanan Chinchwadkar <[email protected]> 
To: 
General MarkLogic Developer Discussion <[email protected]> 
Date: 
08/30/2011 08:37 PM 
Subject: 
Re: [MarkLogic Dev General] Issue with element-attribute-value        with 
       query 
Sent by: 
[email protected]
 




Abhishek, 
  
Can you try running the cts:search  as ?unfiltered? and see if it throws 
out something? If it does, then perhaps the results you are seeing are 
correct. 
  
The documentation for cts:element-attribute-values  says: The values do 
not need to match the query, but they must occur in fragments selected by 
the query. The fragments are not filtered to ensure they match the query, 
but instead selected in the same manner as "unfiltered" cts:search 
operations. 
 
Gajanan 
  
From: [email protected] [
mailto:[email protected]] On Behalf Of Abhishek53 S
Sent: Tuesday, August 30, 2011 7:52 AM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Issue with element-attribute-value with 
query 
  

Hi Folks 

I am having some issue with getting element-attribute values with some 
additional query into the query option. 

The query below is returning 0 records -- which is fine 

cts:search(fn:doc(), 
       cts:and-query(( 
                      cts:element-query(xs:QName("as-project-spec"), 
                          cts:and-query(( 
 
cts:element-attribute-value-query(xs:QName("as-project-spec"),xs:QName("div"),"00000"),
 

 cts:element-word-query(xs:QName("content"),"kolkata") 
                           )) 
                       ) 
                  )) 
) 


Where as the query below is simply returning me some values from the value 
lexicons -- ideally it should not 

cts:element-attribute-values( 
                  xs:QName("as-project-spec"), 
                  xs:QName("div"), 
                  (), 
                  (), 
                  cts:and-query(( 
                      cts:element-query(xs:QName("as-project-spec"), 
                          cts:and-query(( 
 
cts:element-attribute-value-query(xs:QName("as-project-spec"),xs:QName("div"),"00050"),
 

 cts:element-word-query(xs:QName("content"),"kolkata") 
                           )) 
                       ) 
                  )) 
           ) 

Though it is mentioned that this will return the values matching the 
fragments.Ideally as 0 fragments are matching the query 
..element-attribute-values should not return any value. 

Let me know If I a wrong somewhere. 

Thanks & Regards
Abhishek Srivastav
Tata Consultancy Services
Cell:- +91-9883389968
Mailto: [email protected]
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
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
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