Thanks Dave. That's as I suspected, but wanted to make sure. I'm going to try fixing it "the right way" so we don't have to keep updating future releases as well.
Thanks much, -Chad From: [email protected] [mailto:[email protected]] On Behalf Of Dave Cassel Sent: Thursday, May 21, 2015 11:21 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] ML upgrade The impl module is not part of the public API, so best practice is to not call into there directly. As you've found, those functions can and do change, including their interfaces. Of course, you've already got an application that's using them. An option is to copy the old (MarkLogic 5) versions of the functions you need into your own code. -- Dave Cassel<http://davidcassel.net>, @dmcassel<https://twitter.com/dmcassel> Developer Community Manager MarkLogic Corporation<http://www.marklogic.com/> MarkLogic World Tour: Chicago, Houston, New York<http://world.marklogic.com/locations/> From: Chad Bishop <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Thursday, May 21, 2015 at 12:08 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: [MarkLogic Dev General] ML upgrade Greetings, I'm working on an upgrade of ML 5.0-2 to the latest ML 8. The upgrade/installation of the server was easy enough, but I've found many of the core functions where changed...and apparently we called them within our search code. Feel free to roll your eyes as I didn't write it. ;-) Example: import module namespace impl = "http://marklogic.com/appservices/search-impl" at "/MarkLogic/appservices/search/search-impl.xqy"; . . . declare function acsSearch:do-results-query($qtext as xs:string*, $deltaoptions as element(opt:options)?, $ctsquery as element()?, $start as xs:unsignedLong?, $page-length as xs:unsignedLong?, $raw-results as xs:boolean) { let $t-minus-0 := xdmp:elapsed-time() (: merge incoming options once with defaults before parsing :) let $init-options := impl:merge-options($default-options, $deltaoptions) let $parsed-query := if ($ctsquery) then $ctsquery else if ($init-options) then impl:do-tokenize-parse($qtext, $init-options, fn:false()) else fn:error((),"SEARCH-INVALARGS",("requires either $ctsquery or $qtext and $options")) (: create and merge final options with any state contained in the parsed query :) let $options := impl:apply-state($init-options,$parsed-query) . . . let $flwor := impl:build-flwor(($options, <opt:options/>)[1], $combined-query, $start, $end, $quality-weight, $forests) let $_ := debug:log($flwor) let $expr := hof:appservices-lambda($flwor, impl:build-ns-bindings($options) ) let $results := hof:apply-expr($expr) My question is, are these calls to the "impl" module valid / best practice or should I remove/replace them all? Thanks much, -Chad
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
