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

user_script error in insideout mode #480

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

ProvoloneStein
Copy link
Contributor

Hi! I am using insideout mode.
In search filters I often get the error
"user_script:12: too many results to unpack script" in lua script.
I noticed that for none tag filters dnfs is too big. For example, in the testcase dnfs_to_schemes produces a list with 2^n elements. If we add another nested field for search, the number of keys increases dramatically.
I think more complex optimization at "tree to dnfs" may be needed here, but btw added qfix for this error

@Suor
Copy link
Owner

Suor commented Jul 29, 2024

Thanks for pointing this out, your test, however, does not fail for me even on the old code. The number of items allowed to be unpacked might be dependent on Redis version though.

I looked into it and your thought about dnfs() being the source also was fruitful. I've changed it's code to use set[frozenset[tuple]] for intermediate DNFs instead of list[list[tuple]] and it should do the trick. Might be marginally slower though. The code is here #481, will require some lower level unit tests I guess.

Suor added a commit that referenced this pull request Oct 9, 2024
@Suor Suor merged commit 9069063 into Suor:master Oct 9, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants