Hi Ambika,
On Fri, May 6, 2011 at 7:42 PM, Abhishek53 S <[email protected]> wrote: > > Hi Ambika > > Marklogic provide the full text search over the element value so if > search:search or search:resolve uses the qtext without constraint as full > text over elements value.The element attribute value constraint is right in > definition. Boolean operator should come as part of the qtext as input to > the search:parse.pass the option to both the search:parse and search:resolve > too. > > Let me know if your query is not clear. > > regards > Abhishek Srivastav > > Tata Consultancy Services > Cell:- +91-9883389968 > Mailto: [email protected] > Website: > http://www.tcs.com > > ____________________________________________ > Experience certainty. IT Services > Business Solutions > Outsourcing > ____________________________________________ > > > From: > ambika arumugam <[email protected]> > To: > General MarkLogic Developer Discussion <[email protected]> > Date: 05/06/2011 04:53 PM Subject: Re: [MarkLogic Dev General] Reg: > Advanced search Sent by: [email protected] > ------------------------------ > > > > Hi Abhishek, > I am trying to get all documents that match "777700021-001" in value > attributes of data element and "English" in elements > > import module namespace search = "*http://marklogic.com/appservices/search > * <http://marklogic.com/appservices/search>" > at "/MarkLogic/appservices/search/search.xqy"; > > let $options := > <options > xmlns="*http://marklogic.com/appservices/search*<http://marklogic.com/appservices/search> > "> > <constraint name="prop"> > <value> > <element ns="" name="data"/> > <attribute ns="" name="value"/> > </value> > </constraint> > </options> > > return > search:resolve(search:parse("prop:777700021-001" ,$options)) > > I am getting results as expected. > > But the input to search:parse is expected to come dynamically( with > AND/NOT/ OR Operators) to be like this > search:parse('"prop:777700021-001" AND "English"',$options) > > in which, "777700021-001" is the attribute value where as the "English" is > the Element value. > I want the documents that match the criteria given to search:parse i.e. It > should contain 777700021-001 in attribute "value" for the element "data" > and English in any element field. > > Regards, > Ambika > > > > > On Fri, May 6, 2011 at 10:43 AM, Abhishek53 S > <*[email protected]*<[email protected]>> > wrote: > > Ambika > > I am not much clear about your requirement. It seems you are not passing > the search *options *to search:parse API. Please let me know the actual > requirement with code snippet > > Regards > > Abhishek Srivastav > Systems Engineer > Tata Consultancy Services > Cell:- +91-9883389968 > Mailto: *[email protected]* <[email protected]> > Website: *http://www.tcs.com* <http://www.tcs.com/> > ____________________________________________ > Experience certainty. IT Services > Business Solutions > Outsourcing > ____________________________________________ > > From: ambika arumugam > <*[email protected]*<[email protected]> > > To: General MarkLogic Developer Discussion <* > [email protected]* <[email protected]>> Date: > 05/06/2011 > 10:10 AM Subject: [MarkLogic Dev General] Reg: Advanced search Sent by: > *[email protected]*<[email protected]> > > ------------------------------ > > > > > > 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 > * <http://marklogic.com/appservices/search>" > at "/MarkLogic/appservices/search/search.xqy"; > > let $options := > <options > xmlns="*http://marklogic.com/appservices/search*<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]* <[email protected]>* > **http://developer.marklogic.com/mailman/listinfo/general*<http://developer.marklogic.com/mailman/listinfo/general> > > > =====-----=====-----===== > 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]* <[email protected]>* > **http://developer.marklogic.com/mailman/listinfo/general*<http://developer.marklogic.com/mailman/listinfo/general> > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > > > =====-----=====-----===== > 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
