-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Stackoverflow exception when adding a query in a loop #974
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
Comments
The better way to do this would be with a terms query var ids = new List(). //Add you id to ids list //Then run your query Hope this helps On Mon, Oct 6, 2014 at 8:53 AM, Chris Heckathorne [email protected]
Doug Nelson |
That is fine for this example, thanks. But the issue still exists. |
While I could not get it to stackoverflow on my machine the performance starts to degrade dramatically These bitwise ops have been implemented mainly for DSL purposes and queries generally don't exceed more then a 100 individual queries pieces but what is very evident is that when it grows into the 1000s performance plummets.
Which appears to a form of O(nX) Whats going on is that this part of the code stacks a whole bunch of lazy concats to be evaluated: which is then hit by this issue in the BCL: I'm working a fix now as well as refactoring the bitwise routines further. |
This is now fixed in Thanks for reporting this one @goalie7960 ! |
Awesome! Thanks. |
I can consistently create a stackoverflow exception when I run this code. Maybe it's not the most efficient, but it did cause an issue in our code, especially when the maximum value of i is generated at runtime.
The text was updated successfully, but these errors were encountered: