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
[email protected]
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: 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Fri, 23 Mar 2012 12:50:17 -0700
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
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?

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to