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

Large Search Filter exceeds maximum URL length #10630

Open
bferguso opened this issue Feb 22, 2024 · 1 comment
Open

Large Search Filter exceeds maximum URL length #10630

bferguso opened this issue Feb 22, 2024 · 1 comment

Comments

@bferguso
Copy link
Contributor

When filtering resources, if the search filter is complex the maximum URL length can be easily exceeded (by definition I think it's about 2000 characters, however milage varies by browser). In our case it was originally observed when we implemented a filter-by-feature function where any arbitrary geometry in an overlay (which can be complex) could be used as a map filter. The same error can be achieved by generating a complex filter using Advanced Search.

We have implemented a workaround for the interactive search map filter page which submits the filter in the body of a POST rather than a GET if it exceeds maximum URL length, and I'm currently working on resolving a similar issue when exporting the results by CSV.

The downside of the above POST strategy is that the search filter can no longer be saved as searches are currently just bookmarks.

It would be great for Arches to be able to both handle filters that exceed maximum URL length, as well as being able to save such filters for future use.

@whatisgalen
Copy link
Member

whatisgalen commented Mar 2, 2024

We ran into the same problem that became the genesis for #10529 . One thought I had was: do we really need to store every single search parameter in the URL? Is there an alternative where instead of passing them all into the URL, we hash them into a string value? Or better yet use the hash as a key and the query params as a value in cache?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants