Filtering in getGlobalScope #1311
-
Hello ! Here is what I wrote :
My problem is that despite this filter, I still can't access the nodes of my other documents. I can access them though if I remove the uris argument, and basically call super.getGlobalScope. Is there something I misunderstand? Do I misuse my URIs? Also I have been struggling a lot with this issue, I would appreciate any help on that topic. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @antoinelilly, I haven't tried out your code yet, but I'm fairly sure the way you are performing the caching in the last line leads to a few issues. Basically, the first time any scoping happens for a given Does it work as expected if you remove the caching in the last step and instead return the |
Beta Was this translation helpful? Give feedback.
Hey @antoinelilly,
I haven't tried out your code yet, but I'm fairly sure the way you are performing the caching in the last line leads to a few issues. Basically, the first time any scoping happens for a given
referenceType
, thenew MapScope(this.indexManager.allElements(referenceType, uris))
value will be cached for it. Afterwards, even for different documents (which will result in a different set ofuris
), it will reuse the same scope that was stored the first time. You cannot use the global scope cache if your global scope is on a per-document basis.Does it work as expected if you remove the caching in the last step and instead return the
MapScope
directly?