Hi Chad, You should avoid calls to the impl module -- there's no guarantee that anything in there is stable across releases. It looks as though somebody copied/pasted part of the impl module out into this customization, in order to override some default behavior.
I think that search:resolve-nodes() might support what your predecessor was trying to do. I'm just guessing based on some of the words used for variable names. Charles ________________________________ From: [email protected] [[email protected]] on behalf of Chad Bishop [[email protected]] Sent: Thursday, May 21, 2015 9:08 AM To: [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
