We initially started with word-lexicons (include/lexicons) only. But I guess once we configure word lexicons with include and exclude it will impact regular word searches.
Later we went for fields. Somehow I am feeling this may not be a best solution as the include/exclude fields may get changed in future based on end user requirements. And also, every time we change include/exclude database will get re-indexed which I am trying to avoid. Let me know if my understanding is wrong. Usage is like below: Admin will change the configuration i.e the scope of search. The search results should be only those based on scope (i.e. return fragments only if keyword is available In specified fields) Regards, Gnana(GP) -----Original Message----- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of general-requ...@developer.marklogic.com Sent: 18 October 2013 00:30 To: general@developer.marklogic.com Subject: General Digest, Vol 112, Issue 35 Send General mailing list submissions to general@developer.marklogic.com To subscribe or unsubscribe via the World Wide Web, visit http://developer.marklogic.com/mailman/listinfo/general or, via email, send a message with subject or body 'help' to general-requ...@developer.marklogic.com You can reach the person managing the list at general-ow...@developer.marklogic.com When replying, please edit your Subject line so it is more specific than "Re: Contents of General digest..." Today's Topics: 1. Re: Defining The Search Scope (Colleen Whitney) ---------------------------------------------------------------------- Message: 1 Date: Thu, 17 Oct 2013 15:13:57 +0000 From: Colleen Whitney <colleen.whit...@marklogic.com> Subject: Re: [MarkLogic Dev General] Defining The Search Scope To: MarkLogic Developer Discussion <general@developer.marklogic.com> Message-ID: <7bc2c6f58ca12241855f68a08a839450164...@exchg10-be01.marklogic.com> Content-Type: text/plain; charset="windows-1252" Yes, if you want all of your word searches to run over a subset of elements in your document, that's the best way to do it. You might also look at fields, if you want to be able to do this selectively. You can create field-based constraints for the REST API to use, so that your query grammar can include terms like "myfield:foo" to search for foo in a subset of your document. ________________________________ From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of John Zhong [j...@yuxipacific.com] Sent: Thursday, October 17, 2013 8:11 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Defining The Search Scope I think you may want to look at the word query configuration to include/exclude elements: http://docs.marklogic.com/guide/admin/wordquery#id_77008 John On Thu, Oct 17, 2013 at 6:52 AM, Erik Hennum <erik.hen...@marklogic.com<mailto:erik.hen...@marklogic.com>> wrote: Hi, Gnana: Can you provide more detail about what you're trying to accomplish? I'm wondering with the requirements can be met through booleans in structured search: http://docs.marklogic.com/guide/search-dev/structured-query#id_83674 http://docs.marklogic.com/guide/search-dev/structured-query#id_65108 To set a scope in string search, you can use the equivalent cts:* queries in: http://docs.marklogic.com/search:search#opt-additional-query Hoping that helps, Erik Hennum ________________________________ From: general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com> [general-boun...@developer.marklogic.com<mailto:general-boun...@developer.marklogic.com>] on behalf of gnanaprakash.bodire...@cognizant.com<mailto:gnanaprakash.bodire...@cognizant.com> [gnanaprakash.bodire...@cognizant.com<mailto:gnanaprakash.bodire...@cognizant.com>] Sent: Thursday, October 17, 2013 12:57 AM To: general@developer.marklogic.com<mailto:general@developer.marklogic.com> Subject: [MarkLogic Dev General] Defining The Search Scope Hi Is there any way to include/exclude set of elements in a fragment while searching? For example: <root> <element1/> <element2/> ??. <element10/> </root> While performing search (REST API based), I want my search (keyword or constraints based) to look into few elements like (element1, element 3, element4). What is the best approach to define the scope of search? Regards, Gnana(GP) 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<mailto:General@developer.marklogic.com> http://developer.marklogic.com/mailman/listinfo/general -------------- next part -------------- An HTML attachment was scrubbed... URL: http://developer.marklogic.com/pipermail/general/attachments/20131017/37653c17/attachment-0001.html ------------------------------ _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general End of General Digest, Vol 112, Issue 35 **************************************** 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