Skip to content
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

Validate expressions passed to MarkLogic cts:search, etc. #91

Open
rhdunn opened this issue Sep 1, 2018 · 0 comments
Open

Validate expressions passed to MarkLogic cts:search, etc. #91

rhdunn opened this issue Sep 1, 2018 · 0 comments

Comments

@rhdunn
Copy link
Owner

rhdunn commented Sep 1, 2018

MarkLogic places restrictions on the expressions passed to cts:search. Expressions that are not fully searchable raise XDMP-UNSEARCHABLE errors. It would be useful to validate these in the plugin.

Logic:

  1. Locate function calls to functions that use fully searchable expressions.
  2. Locate the argument subquery for the expression parameter.
  3. Walk the subquery PSI tree.
  4. If a node in the tree does not implement XQueryConformance, it is unsearchable and an error is raised.
  5. If the node does not conform to MarkLogicSearchableXPath, it is unsearchable and an error is raised.

Reference:

  1. https://docs.marklogic.com/guide/performance/query_meters#id_17135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant