Open amclark42 opened 2 years ago
Putting my analysis here: I am able to get results in Monex if I change this module to use collection($indexes:collection)/range:index-keys-for-field
instead of the function in the variable. I think this is because the function reference retrieved from function-lookup
and stored in the variable $indexes:range-lookup
(l.81) was not initialized with the explicit context of the collection.
I can definitely submit a pull request for this. However, I found that while my fix does produce a table of keys, the same key occurs in multiple rows with a frequency of 1, suggesting there’s a bigger underlying issue in eXist. eXist issue 4074 may be related.
@amclark42 Thanks for sharing your findings. Your idea to submit a PR with your fix would be great.
I'd like to see us add some sample data to monex, along with a configuration file that demonstrates all of the indexes that monex is capable of displaying. This would help both people who are trying to debug their own datasets and people debugging/supporting monex and eXist itself. Your small test here would be a good starting point!
Other good candidates would be the test suites for the various types of indexes in eXist, e.g.:
I'd be happy to review the PR, help, etc. Thanks!
Describe the bug I created a range index field for a collection, but Monex doesn’t show any keys for that index. However, a query using the
range
functions confirms that the index has been populated.Expected behavior I expected to see the keys indexed for the given field.
To Reproduce
The test suite above should completely pass, and return something like:
The tear-down function is commented out, because now you can check what Monex has:
/db/sudoJson
.string-id
indexed item.There will be 0 results when there should be 1.
Context