Create or replace named query options.
You can use this parameter as a fallback to the request Content-type
header. The Content-type header takes precedence
The MIME type of the data in the request body, either
Upon success, MarkLogic Server returns status 201 (Created) or 204 (Updated).
If the payload is invalid, MarkLogic Server responds with status 400
by default. However, validation may be disabled. For details, see
rest-adminrole, or the following privileges:
For more details, see Configuring Query Options in the REST Application Developer's Guide.
The request body must be a valid
expressed in either XML or JSON, depending upon the request Content-Type
format parameter. See the Usage Notes, below.
By default, options are validated. Options validation can be disabled
If the named options do not exist, they are created. If the named options exist, the options in the request body replace the existing query options.
default, the default search
options are modified.
Query options are expressed as a multi-level JSON or XML structure. The following list is brief summary of the top level option XML elements or JSON objects. For details, see Search Customization Using Query Options in the Search Developer's Guide and Appendix: Query Options Reference in the Search Developer's Guide.
- Additional serialized queries that are AND'd with any string or structured query supplied to a request.
- The maximum number of threads used to resolve facets.
- Constraints used to control the search and faceting.
- Activate debugging mode.
- Define content to be used as the default source of search suggestions.
- Specify data to return in the
metadatasection of the response output.
- One or more forest ids.
- The global fragment scope over which to search, either properties or documents.
- Specify a custom search grammar. The default grammar defines "Google-style" parsing.
- A list of state elements, each representing a unique runtime configuration option.
- The number of results per page. The default is 10.
- A weighting factor to use in the query. The default is 1.0.
- Whether to include results from builtin or user-defined aggregate functions in the search response. Default: true.
- Whether to include the original constraint definitions in the results. Default: false.
- Whether to include resolved facets in the results. Default: true.
- Whether to include value frequencies in range indexes and lexicons in the results. Default: true.
- Whether to include statistics in the results. Default: true.
- Whether to include
xdmp:planoutput in the results. Default: false.
- Whether to include the original query text in the results. Default: true.
- Whether to include the XML query representation in the results. Default: false.
- Whether to include search results in the output. Default: true.
- Whether to include a list of URLS of similar documents with each search result. Default: false.
- Whether to include values from range indexes and lexicons in the results. Default: true.
- For advanced usrs. Additional options to pass in, such as
score-logtfidf. Default: No additional options.
- An expression to search. Whatever expression is specified is return from the search.
- Set the default sort order.
- A constraint source to override a named constraint when using
- Specifies handling of empty searches and controls option for how individual are represented when parsing the search.
- Specifies a function for processing search results to create snippet output.
- Specifies constraints for finding value range index and lexicon co-ocurrences.
- Specifies constraints for finding values in range indexes and lexicons.
$ curl --anyauth --user user:password -T './options2' -i \ -H "Content-type:application/xml" \ http://localhost:8000/v1/config/query/scene ==> MarkLogic Server creates or updates the query options named "scene". The response includes the following headers: Server: MarkLogic Content-Type: text/plain; charset=UTF-8 Content-Length: 31 Connection: close HTTP/1.1 100 Continue HTTP/1.1 204 Updated Server: MarkLogic Content-Length: 0 Connection: close