Reputation: 2620
I am using MarkLogic version 8.
I am able to set all the other configurations of database using Admin
API except word lexicon
Is there any way to add word lexicon
using admin
API.
I have to add word lexicon
with unicode codepoint
collation.
Upvotes: 0
Views: 38
Reputation: 11214
I think you're after the database-add-word-lexicon() method: http://docs.marklogic.com/8.0/admin:database-add-word-lexicon
xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy";
let $config := admin:get-configuration()
let $dbid := xdmp:database("Documents")
let $lexspec := admin:database-word-lexicon("http://marklogic.com/collation/codepoint")
return admin:save-configuration(admin:database-add-word-lexicon($config, $dbid, $lexspec))
(Update the code according to your requirements)
Upvotes: 5