[MarkLogic Dev General] Defining The Search Scope

Gnanaprakash.Bodireddy at cognizant.com Gnanaprakash.Bodireddy at cognizant.com
Thu Oct 17 10:49:35 PDT 2013


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-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of general-request at developer.marklogic.com
Sent: 18 October 2013 00:30
To: general at developer.marklogic.com
Subject: General Digest, Vol 112, Issue 35

Send General mailing list submissions to
        general at 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-request at developer.marklogic.com

You can reach the person managing the list at
        general-owner at 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.Whitney at marklogic.com>
Subject: Re: [MarkLogic Dev General] Defining The Search Scope
To: MarkLogic Developer Discussion <general at developer.marklogic.com>
Message-ID:
        <7BC2C6F58CA12241855F68A08A839450164646 at 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-bounces at developer.marklogic.com [general-bounces at developer.marklogic.com] on behalf of John Zhong [john at 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.Hennum at marklogic.com<mailto:Erik.Hennum at 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-bounces at developer.marklogic.com<mailto:general-bounces at developer.marklogic.com> [general-bounces at developer.marklogic.com<mailto:general-bounces at developer.marklogic.com>] on behalf of Gnanaprakash.Bodireddy at cognizant.com<mailto:Gnanaprakash.Bodireddy at cognizant.com> [Gnanaprakash.Bodireddy at cognizant.com<mailto:Gnanaprakash.Bodireddy at cognizant.com>]
Sent: Thursday, October 17, 2013 12:57 AM
To: general at developer.marklogic.com<mailto:general at 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 at developer.marklogic.com<mailto:General at 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 at 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.


More information about the General mailing list