0
votes

I've been adding a number of search constraints to my Marklogic 6 REST server instance. When using a database module for the REST server, I can see an XML configuration file with the database URL (for example /15946974354972814010/rest-api/options/sgd-identifier.xml).

When I move the modules for the REST server from the database to the filesystem, I can no longer access the sgd-identifier.xml or default.xml files, which does make sense because the database is no longer used. So I thought I would have to copy those files to the folder on my filesystem.

But I cannot get it going. I've been trying stuff to put default.xml in all kinds of folders, including creating a rest-api/options folder. It doesn't get picked up. Is this impossible?

Update: now I understand that it is not possible. Would be nice if Marklogic improves error message and / or documentation because a http 500 error when doing a curl upload to server is not really helpful. I'll accept Dave Cassell's answer, even thought grtjn is also helping out by making it a bit clearer - can't accept both...

2

2 Answers

1
votes

From the docs:

You can also create custom query options. Before you can use a set of custom query options, you must install them as named options, using /config/query/{name}.

Installing the options through the REST API will put them into your modules database, but that won't work if you've set up to use the filesystem for your modules.

0
votes

Dave is right, installing REST api options, extensions, and transforms is not designed to work against app servers running from file-system. If you insist, you will need to mimic the process of installing such artifacts into the proper location. The easiest way to discover how, is to do it against a database first, explore the database to see where and in what shape it ends up in the database, and do the same on the file-system.

It can also be worth considering using a deployment tool that makes it easy to just run against a modules database. Something like Roxy for instance..

HTH!