hi all, I am performing a search on elements as well attributes using search API. I am using constraints to do the element-attribute search.
For the xml, <data value="777700021-001"/> <lang>English</lang> I am using, import module namespace search = "http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy"; let $options := <options xmlns="http://marklogic.com/appservices/search"> <constraint name="prop"> <value> <element ns="" name="data"/> <attribute ns="" name="value"/> </value> </constraint> </options> let $h:=search:parse('"English" AND "prop:777700021-001"') return search:resolve($h, $options) For me the search for English should be made in all the element nodes where as prop:777700021-001should work with the constraint(On element-attribute value of data element with attribute value) If i try the same with the search:search it works search:search('prop:777700021-001', $options) But i need to perform the constraint search(for eleemnt-attribute values ) along with element-values. So i go for search:resolve(search:parse('"English" AND "prop:777700021-001"')) I am missing something to get this working. Regards Ambika
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
