|
Sundar – The <term-option> should be nested within <term>:
<term>
<term-option>case-insensitive</term-option>
<term-option>diacritic-insensitive</term-option>
<term-option>punctuation-insensitive</term-option>
</term>
-Will
From: Sundaravadivel Kandasamy <[email protected]>
Reply-To: MarkLogic Discussion <[email protected]> Date: Friday, November 1, 2013 at 4:55 AM To: MarkLogic Discussion <[email protected]> Subject: Re: [MarkLogic Dev General] Search case insensitive Hi Geert, This is how we set the case insensitive option, could you help now? èSearch
API invocation search:search($searchText, $searchOptions, $startPage, $pageSize) $searchText will have the search term, $startPage ranges from 1 to 10 and $pageSize is 10 $searchOptions variable will have the below options, <options xmlns="http://marklogic.com/appservices/search"> <debug>false</debug> <search-option>score-logtfidf</search-option> <search-option>unfiltered</search-option> <term-option>case-insensitive</term-option> <term-option>diacritic-insensitive</term-option> <term-option>punctuation-insensitive</term-option>
<quality-weight>1.0</quality-weight> <return-constraints>false</return-constraints> <return-facets>true</return-facets> <return-qtext>true</return-qtext> <return-query>false</return-query> <return-results>true</return-results> <return-metrics>true</return-metrics> <return-similar>false</return-similar> <transform-results apply="src-snippet" ns="/src-snippet"
at="/src-snippet.xqy"> <per-match-tokens>30</per-match-tokens> <max-matches>4</max-matches> <max-snippet-chars>200</max-snippet-chars> <preferred-elements/> </transform-results> <additional-query>{$additionalQuery}</additional-query> {$sortBy} <sort-order direction="descending"> <score/> </sort-order> </options> Regards, Sundar From:
[email protected] [mailto:[email protected]]
On Behalf Of Geert Josten Hi Sundar, If you supply all-lower-case search terms, MarkLogic usually assumes case-insensitive searching by default. Whether your term-option should have worked, that may depend on where you put it. If you could show
more code, we could give more accurate feedback.. Kind regards, Geert Van:[email protected]
[mailto:[email protected]]
Namens Sundaravadivel Kandasamy Hi, We use Search API for search and set the option <term-option>case-insensitive</term-option> for case-insensitive search, but it seems not work. Search yields only case sensitive search results. Any other options or configuration
need to set for case-insensitive search? Query Details API: search:search and also cts:query in the <additional-query> Thanks in Advance. Sundar
|
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
