[MarkLogic Dev General] phrase search containing stemmed results

Stewart Shelline ShellineSE at ldschurch.org
Thu Mar 22 13:47:32 PDT 2012


You should also be able to use <term-option>exact</term-option>, which is equivalent to:

                <term-option>case-sensitive</term-option>
                <term-option>diacritic-sensitive</term-option>
                <term-option>punctuation-sensitive</term-option>
                <term-option>whitespace-sensitive</term-option>
                <term-option>unstemmed</term-option>
                <term-option>unwildcarded</term-option>

SS

From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Danny Sinang
Sent: Thursday, March 22, 2012 2:40 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] phrase search containing stemmed results

Yup, the query I sent in the original email did contain the double-quotes to indicate a phrase search.

But despite the double-quotes, I still got a result containing "sneak out" and "sneaking out", which I guess means stemmed searches apply to phrase searches.

Regards,
Danny
On Thu, Mar 22, 2012 at 4:33 PM, Ryan Dew <ryan.j.dew at gmail.com<mailto:ryan.j.dew at gmail.com>> wrote:
It this case it sounds like you want to surround the query with quotes, like so: search:search('"sneak out"'). That is how you search for an exact phrase.
On Thu, Mar 22, 2012 at 2:10 PM, Danny Sinang <d.sinang at gmail.com<mailto:d.sinang at gmail.com>> wrote:
Thanks Ryan.

We have a central search module using the same search options.

Is there a way to tell ML to do unstemmed searching just for phrase searches ?

Regards,
Danny

On Thu, Mar 22, 2012 at 4:04 PM, Ryan Dew <ryan.j.dew at gmail.com<mailto:ryan.j.dew at gmail.com>> wrote:
That is how it is supposed to behave. You can pass the following search options to change that behavior:

 <options xmlns="http://marklogic.com/appservices/search">
    <term>
        <term-option>unstemmed</term-option>
    </term>
</options>

On Thu, Mar 22, 2012 at 1:56 PM, Danny Sinang <d.sinang at gmail.com<mailto:d.sinang at gmail.com>> wrote:

I did a search:search('"sneak out"') but got results containing "sneak out" and "sneaking out". Is this the supposed behavior ? Or is it a bug ?

Is there a way to force search to return just exact match results without disabling stemmed search globally ?

Regards,
Danny

_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general


_______________________________________________
General mailing list
General at developer.marklogic.com<mailto:General at developer.marklogic.com>
http://developer.marklogic.com/mailman/listinfo/general


 NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120322/9fa0a0fa/attachment-0001.html 


More information about the General mailing list