[MarkLogic Dev General] Suggestion Source case sensitivity

Clark Richey Clark.Richey at marklogic.com
Fri Mar 23 19:42:17 PDT 2012


Could you just use some custom JavaScript to parse the search box and when there is a search constraint (something followed by a colon), capitalize the first letter before sending it to the server for the search:suggest results?
Clark D. Richey, Jr.
Principal  Technologist / SE Manager DoD
MarkLogic Corporation
Clark.Richey at marklogic.com
Cell:  +1 240 252 7507
www.marklogic.com<http://www.marklogic.com/>
This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation.

From: "matt.broekhuis at thomsonreuters.com<mailto:matt.broekhuis at thomsonreuters.com>" <matt.broekhuis at thomsonreuters.com<mailto:matt.broekhuis at thomsonreuters.com>>
Reply-To: MarkLogic Developer Discussion <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Date: Fri, 23 Mar 2012 12:50:17 -0700
To: "general at developer.marklogic.com<mailto:general at developer.marklogic.com>" <general at developer.marklogic.com<mailto:general at developer.marklogic.com>>
Subject: [MarkLogic Dev General] Suggestion Source case sensitivity

I’m using the search:suggest() api call. I have a large amount of constraints, and their affiliated suggestion sources define.

The requirements are such that the constraints should be upper case:

<search:constraintname="Format">
        <search:valuetype="xs:string">
            <search:elementns="mynamespace"name="itemFormat"/>
        </search:value>
        <search:term-option>case-insensitive</search:term-option>
    </search:constraint>

<search:suggestion-sourceref="Format">
        <search:rangetype="xs:string"facet="true">
            <search:elementns="mynamespace"name="itemFormat"/>
        </search:range>
    </search:suggestion-source>


However, the user will type in

format

with a lower case, and the expectation is that Format: should be suggested. How do I make the suggestion source’s case insensitive?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20120323/3281199a/attachment-0001.html 


More information about the General mailing list