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

Parser Stack Overflow on Search Page with Long Queries #67

Open
LTR14 opened this issue Jun 26, 2023 · 0 comments
Open

Parser Stack Overflow on Search Page with Long Queries #67

LTR14 opened this issue Jun 26, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@LTR14
Copy link
Collaborator

LTR14 commented Jun 26, 2023

Source: (Any branch) PPUC/PxPUC/views.py in ResearcherSearchList

Description: When searching for something with many words the search algorithm causes a stack overflow due to the loop iterating so many times over the query and doing so many database operations.

To Reproduce: Type "No corroborative evidence is obtained the complaint shall be classified as unfounded" into the search bar on a local version and look for the error within the terminal window. The error:

django.db.utils.OperationalError: parser stack overflow
[26/Jun/2023 15:40:03] "GET /PxPUC/researcher?query=%22No%20corroborative%20evidence%20is%20obtained%20the%20complaint%20shall%20be%20classified%20as%20unfounded%22 HTTP/1.1" 500 245493

Solution: Redo the search algorithm logic such that a loop over a long string isn't needed

@LTR14 LTR14 added bug Something isn't working help wanted Extra attention is needed labels Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant