-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for cts:annotation in cts:query? #1648
Comments
Correct, there's not support for adding annotation elements. What's your use case for them? Like would you eventually serialize the query to a place where a developer / user would see it? |
Hi @rjrudin, we are starting to use alerts in MarkLogic server. The queries used in the alert-rules are composed of two parts: one is given by our customers and the other is given by our rights and roles model. From time to time the rights and roles part is updated and thus we need to update the queries in all alert-rules. Here we only want to modify the half of the query that corresponds to the rights and roles, we absolutely do not want to touch the part of the query given by our customers. - Annotations help us to identify the parts correctly. |
Hi @ralfhergert - thanks for the feedback. It's not directly supported today via the Java Client, though you would at least have a workaround of:
|
CtsQueries allow to be enriched with cts:annotation-elements: https://docs.marklogic.com/guide/search-dev/cts_query#id_28038
Those elements are ignored by MarkLogic when the query is executed. cts:annotations can be used for various purposes (like documentation) and in our case we use it as a marker-element to identify certain parts of the query to be able to modify and manipulate them later after the creation.
Do the QueryBuilders support to add annotation-elements? (I searched, but didn't find it yet.)
The text was updated successfully, but these errors were encountered: