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

When too many collections are specified, the OpenSearch search url gets too long and causes an error #770

Open
philvarner opened this issue May 15, 2024 · 0 comments

Comments

@philvarner
Copy link
Collaborator

philvarner commented May 15, 2024

When searching, the collections parameter is appended to both the OpenSearch url (e.g., /coll1,coll2,coll2/_search) and to the search body as a terms predicate on the collection document attribute. These should be redundant, as all items in each index should have a collections value that's the same as the index. There is a small performance benefit to restricting the indicies, but this apparently causes an error when too many (~60) are specified.

The work here should be to not include the index names in the path if they are all greater than some limit, tbd, and instead simply treat it as an all-index search as if no collections had been specified (without the collections index, etc).

Exception is:

{"level":"error","message":"Response Error","meta":{"body":"<html>\r\n<head><title>414 Request-URI Too Large</title></head>\r\n<body>\r\n<center><h1>414 Request-URI Too Large</h1></center>\r\n</body>\r\n</html>\r\n","headers":{"connection":"close","content-length":"142","content-type":"text/html","date":"Thu, 16 May 2024 21:56:58 GMT","server":"awselb/2.0"},"meta":{"aborted":false,"attempts":0,"connection":{"_openRequests":0,"deadCount":0,"headers":{},"id":"https://URL/","resurrectTimeout":0,"roles":{"data":true,"ingest":true},"status":"alive","url":"https://URL/"},"context":null,"name":"opensearch-js","request":{"id":3,"options":{},"params":{"body":"{\"query\":{\"bool\":{\"must_not\":[],\"filter\":[{\"terms\":{\"collection\":....
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

No branches or pull requests

1 participant