Bindu,
That looks like a bug, but I think you have an older version of
lib-parser.xqy. In the 2008-05-13 zip release (and in svn at
http://developer.marklogic.com/svn/lib-search/trunk/release) I see
this:
...
define function lp:get-cts-query
($qs as xs:string?, $map as element(lp:search-field-map)?,
$options as xs:string*)
as cts:query?
{
lp:get-cts-query($qs, $map, $options, ())
}
define function lp:get-cts-query
($qs as xs:string?, $map as element(lp:search-field-map)?,
$options as xs:string*, $lang as xs:string?)
as cts:query?
{
lp:deserialize-query(
lp:get-cts-query-element($qs, $map, $lang), false(), $options)
}
...
More importantly, this test case does what I'd expect (using 4.0-3
on
linux x86-64):
import module namespace lp='http://www.marklogic.com/ps/lib/lib-
parser'
at 'lib-parser.xqy';
lp:get-cts-query(
'cat', (),
("case-insensitive", "diacritic-insensitive", "punctuation-
sensitive")
)
=>
<cts:word-query>
<cts:text xml:lang="en">cat</cts:text>
<cts:option>case-insensitive</cts:option>
<cts:option>diacritic-insensitive</cts:option>
<cts:option>punctuation-sensitive</cts:option>
</cts:word-query>
thanks,
-- Mike
On 2009-01-20 09:00, Bindu Wavell wrote:
Lib search contains the following:
lp:get-cts-query($text, $field-map,
("case-insensitive",
"diacritic-insensitive",
"punctuation-sensitive") )
Then the lp:get-cts-query contains the following:
declare function lp:get-cts-query(
$qs as xs:string?, $map as element(lp:search-field-map)?,
$options as xs:string*)
as cts:query?
{
(: $options is ignored :)
lp:get-cts-query($qs, $map)
};
So the expected behavior of ignoring case does not come to pass and
instead we see the default behavior:
If neither "case-sensitive" nor "case-insensitive" is present,
$text
is used to determine case sensitivity. If $text contains no
uppercase,
it specifies "case-insensitive". If $text contains uppercase, it
specifies "case-sensitive".
Is this a bug in lib-search/lib-parser or intended behavior?
Thanks,
-- Bindu
------------------------------------------------------------------------
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general