Tim Meagher
Tim Meagher

Reputation: 163

Where are the default search/query options stored in MarkLogic?

I know I can read these using the /v1/config/query/(default|{name}) (GET) REST API (and set them too), but I'd like to know where they are stored either in the file system or the database.

Upvotes: 1

Views: 80

Answers (1)

Mads Hansen
Mads Hansen

Reputation: 66723

You can also retrieve them with search:get-default-options()

import module namespace search = "http://marklogic.com/appservices/search"
    at "/MarkLogic/appservices/search/search.xqy";
search:get-default-options()

And if you look at the implementation of that method, you will find that the get-default-options() in /Modules/MarkLogic/appservices/search/search.xqy returns the variable $impl:default-options which is defined in /Modules/MarkLogic/appservices/search/search-impl.xqy.

There you will find the default search options.

Upvotes: 0

Related Questions