I think a case-insensitive collation might accomplish this.... Colleen Whitney MarkLogic Corporation
Phone +1 650 655 2366 email [email protected] web 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] [[email protected]] On Behalf Of Jakob Fix [[email protected]] Sent: Wednesday, April 11, 2012 2:38 PM To: General Mark Logic Developer Discussion Subject: [MarkLogic Dev General] case sensitivity and search:search Hello, my goal is to search a couple of elements for the type-ahead (aka search:suggest) and to return suggestions. I've created a word field index (called "suggest-field") based on the two elements. The search has to be case insensitive, i.e. currently I get results like this: env ENV envahissantes envahisseur envejece for the first two, I want only "env", not "ENV" or a potential "Env". I've disabled "fast case sensitive searches" on the database level as otherwise this was inherited by the field configuration. I have the basic collation (http://marklogic.com/collation/). Also, I'm using a term-option set to "case-insensitive" (see sample query below). But none of these options make that the search considers different case irrelevant. Which knob do I have to twiddle? let $options := <search:options xmlns="http://marklogic.com/appservices/search"> <default-suggestion-source> <word> <field name="suggest-field"/> </word> </default-suggestion-source> <term> <term-option>case-insensitive</term-option> </term> </search:options> return search:suggest("env", $options, 5) cheers, Jakob. _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
