Using lib-parser from svn and the 4.0 version of lib-search (from Silvano) appears to have resolved my issue.

Thanks,


-- Bindu

On Jan 20, 2009, at 10:53 AM, Michael Blakeley wrote:

I don't know about lib-search itself, but lib-parser.xqy from svn
(http://developer.marklogic.com/svn/lib-search/trunk/release/) passes
its unit tests with 4.0-3. The zip probably doesn't, since it was
released before 4.0-1 was released.

If you run into problems, of course we're interested in test cases (and
patches too).

-- Mike

On 2009-01-20 09:41, Bindu Wavell wrote:
Mike,

The version of lib-search in subversion appears to be targeted at ML
3.2 (with xquery version "0.9-ml")... I obtained a version from
Silvano that has been updated to work with ML 4 xquery syntax. Are you comfortable that the release version in subversion will work correctly
with ML 4 at this time?

-- Bindu

On Jan 20, 2009, at 10:16 AM, Michael Blakeley wrote:

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

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

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

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

Reply via email to