Hi Erik Once small clarification needed on filtered/unfiltered option.
Currently when I update the search-option as "filtered", search on characters liks '&' are being searched as expected. But, the combination of filtered and constraints are not working. Am I doing anything wrong here? Example: search-option: unfiltered URL: ?q=program:"Journeys" Results: 4k + search-option: filtered URL: ?q=program:"Journeys" Results: 0 REST API: Options <search:options xmlns:search="http://marklogic.com/appservices/search"> <search:quality-weight>0</search:quality-weight> <search:search-option>unfiltered</search:search-option> <search:constraint name="program"> <search:range collation="http://marklogic.com/collation/" type="xs:string" facet="false"> <search:element ns="<<our namespace>>" name="program"/> </search:range> </search:constraint> </search:options> Is there any impact on constraints on range indexes with filtered options in REST? Gnana Gnanaprakash Bodireddy | Sr. Associate - Projects | IME | Cognizant Technology Solutions. Address: Raheja MindSpace, 7th Floor, Hyderabad. O: +91 (40) 44514444 extn: 672103| Mobile: +91 8897575644 From: Erik Hennum [mailto:erik.hen...@marklogic.com] Sent: Wednesday, March 13, 2013 9:39 PM To: Bodireddy, Gnanaprakash (Cognizant) Cc: general@developer.marklogic.com Subject: RE: Issue with search on & and * in REST API Hi, Gnana: Glad to hear that you got to success on just a few hints. By the way, I hope I didn't send a message that filtering should be avoided categorically. If your indexed criteria is selective such that you filter a small set of documents, it complements what's possible with an index. You can test the use of indexes by adding the return-plan flag to your options. The return-metrics flag is helpful for comparing performance. Finally, the debug and return-query flags can be useful to understand the executed query. Erik Hennum ________________________________ From: gnanaprakash.bodire...@cognizant.com<mailto:gnanaprakash.bodire...@cognizant.com> [gnanaprakash.bodire...@cognizant.com] Sent: Tuesday, March 12, 2013 11:05 PM To: Erik Hennum Cc: general@developer.marklogic.com<mailto:general@developer.marklogic.com>; cor...@developer.marklogic.com<mailto:cor...@developer.marklogic.com> Subject: RE: Issue with search on & and * in REST API Hi Erik, Thanks for your reply and suggestions :) I now understand the issue I got into. I updated my search options as filtered and it's working as expected now. We will review the performance impact and will revert our configuration (options) change if required. Gnana Gnanaprakash Bodireddy | Sr. Associate - Projects | IME | Cognizant Technology Solutions. Address: Raheja MindSpace, 7th Floor, Hyderabad. O: +91 (40) 44514444 extn: 672103| Mobile: +91 8897575644 From: Erik Hennum [mailto:erik.hen...@marklogic.com] Sent: Tuesday, March 12, 2013 7:03 PM To: Bodireddy, Gnanaprakash (Cognizant) Cc: general@developer.marklogic.com<mailto:general@developer.marklogic.com>; cor...@developer.marklogic.com<mailto:cor...@developer.marklogic.com> Subject: RE: Issue with search on & and * in REST API Hi, Gnana: The problem is not HTTP encoding but rather indexing. The default options for the REST API execute search as unfiltered for best performance. However, punctuation characters are not indexed by default and thus ignored for unfiltered search. Possible approaches include: * Configuring options to run punctuation sensitive, filtered searches. If your queries always include indexed criteria that produces a small result set, this approach is fine. * Using a range index so the punctuation characters are in the index. This approach is appropriate if the matched characters are always in one element or JSON key (or a few, using a field). Because the string search parser strips out punctuation characters by default, searches on punctuation are easiest to do with structured search. Hoping that helps, Erik Hennum ________________________________ From: gnanaprakash.bodire...@cognizant.com<mailto:gnanaprakash.bodire...@cognizant.com> [gnanaprakash.bodire...@cognizant.com] Sent: Tuesday, March 12, 2013 3:45 AM To: Erik Hennum Cc: general@developer.marklogic.com<mailto:general@developer.marklogic.com>; cor...@developer.marklogic.com<mailto:cor...@developer.marklogic.com> Subject: Issue with search on & and * in REST API Hi Erik I am currently facing an issue in REST API searching for special characters & and * I am trying to encode and send the characters but am getting all results instead of restricted results. & - %26 * - %2A When I pass q=%26 or q=%2A, we are getting all results. Can you please help me in getting the right encoding or way to get the proper results for these characters? Note: In Corona it worked perfectly passing %26 Gnana Gnanaprakash Bodireddy | Sr. Associate - Projects | IME | Cognizant Technology Solutions. Address: Raheja MindSpace, 7th Floor, Hyderabad. O: +91 (40) 44514444 extn: 672103| Mobile: +91 8897575644 This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful.
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general