Hi Abhishek, The default suggestion source doesn't accept more than one source, unfortunately. (If you're not sure, you can always use search:check-options($options, true()) to check the structure of your options node and see if your index configuration supports the options you've specified.)
One question: what would you expect the behavior to be if you specified two default sources? Would it be an intersection of the two, or fallback behavior of some kind? I'm interested in understanding why you need to combine them; there might be another way to accomplish what you need (or a case for an RFE). --Colleen ________________________________________ From: [email protected] [[email protected]] On Behalf Of Abhishek53 S [[email protected]] Sent: Sunday, July 10, 2011 10:16 AM To: General MarkLogic Developer Discussion Cc: [email protected] Subject: [MarkLogic Dev General] Mixed suggestion source for autosuggest. Hi Folks I required some mixed default-suggestion-source for autosuggest i.e. both range and field-word-lexicon. Individualy both are working fine but in case of both as a combined source of suggestion it is returning empty sequence. Following is my sample query xquery version "1.0-ml"; import module namespace search = "http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy"; let $searchTerm := "che" let $options := <search:options xmlns="http://marklogic.com/appservices/search"> <default-suggestion-source> <range type="xs:string"> <element name="additional"/> </range> <word> <field name="autosuggest"/> </word> </default-suggestion-source> </search:options> return search:suggest($searchTerm ,$options ,1000) Let me know if I am wrong somewhere. Or it is not possible with search:suggest Thanks in advance! Abhishek Srivastav Tata Consultancy Services Cell:- +91-9883389968 Mailto: [email protected]<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
