Is there a supported way of discovering if a registered
query ID is still registered?
In the docs, it describes that a cts:search will throw
an exception if an instance of cts:registered-query refers
to a no-longer-valid registered query ID, but this is too
late to be helpful to me.
I also know that I can re-register a query on every use
and it will hash to the same ID, but that is also not helpful
in this use case.
I need to build complex access-control queries with
potentially thousands of terms. These terms are derived
from parsing JSON descriptions that are then used to fetch
stored query fragments which are combined and then registered
together.
The same, arbitrarily complex JSON strings are re-used often.
What I want to do it use a hash of the JSON as a key to identify
which registered query to apply. It's the effort of building
the query from the JSON that I want to avoid.
I can make a run-time map of JSON hash values to registered
query IDs, that's easy. But I can't see a reliable way to
determine if a given registration key is still valid.
Because the queries are built up separately from where
the search ultimately happens, it's not very practical to
catch an exception at cts:search time and rewind to build
the query.
Does anyone have a solution for enquiring if a registered
query ID is still safe to use?
Thanks.
---
Ron Hitchens {mailto:[email protected]} Ronsoft Technologies
+44 7879 358 212 (voice) http://www.ronsoft.com
+1 707 924 3878 (fax) Bit Twiddling At Its Finest
"No amount of belief establishes any fact." -Unknown
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general