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

Extended search: do not cache operator options across corpora #409

Open
arildm opened this issue Nov 21, 2024 · 0 comments
Open

Extended search: do not cache operator options across corpora #409

arildm opened this issue Nov 21, 2024 · 0 comments
Labels

Comments

@arildm
Copy link
Member

arildm commented Nov 21, 2024

The getOpts function in extendedCqpTerm builds operator options for the selected attribute. It is memoized, so the same attribute will yield the same operator options. However, different corpora may have different settings for the same attribute name. [Example needed.] Because of the memoizing, when changing corpus selection, the operator options will not change as they should.

It doesn't look to me like the memoizing is really needed. Try removing it. Otherwise, maybe use .cache of the memoized function to clear the cache when changing corpora. Or include corpus selection as an argument to cache by.

@arildm arildm added the bug label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant