Hi Team, While analyzing on “search:suggest” API we were not able to understand the following feature in detail:
xquery version "1.0-ml"; import module namespace search = "http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy"; let $options := <options xmlns="http://marklogic.com/appservices/search"> <constraint name="*tag*"> <range type="xs:string" facet="true"> <element ns="http://www.simonandschuster.com/namespaces/sands_pub" name="chapter"/> </range> </constraint> <suggestion-source name="*tag*"> <range collation="http://marklogic.com/collation" type="xs:string" facet="true"> <element ns="http://www.simonandschuster.com/namespaces/sands_pub" name="title"/> </range> </suggestion-source> </options> return search:suggest(("*tag*:A","*tag*:B"), $options,(),5,2) We have created 2 element range index (title, chapter) through admin screen. When we try to run the above snippet, we are getting following error [1.0-ml] XDMP-ELEMRIDXNOTFOUND: cts:element-value-match(QName(" http://www.simonandschuster.com/namespaces/sands_pub", "chapter"), "B*", ("type=string", "document"), cts:element-range-query(QName(" http://www.simonandschuster.com/namespaces/sands_pub", "chapter"), "=", "A", ("collation=http://marklogic.com/collation/codepoint"), 1), xs:double("1"), ()) -- No string element range index for QName(" http://www.simonandschuster.com/namespaces/sands_pub", "chapter") http://marklogic.com/collation/codepoint When we try to run the above code with “titlelist” or some other word instead of tag in the entire name attribute, we are able to execute the code without error. Can anyone help us to clearly understand the search:suggest feature with all the available option. Thanks in Advance. Regards, Selven Xavier.A
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
