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

Match max label length with solr search input #442

Open
mkrzmr opened this issue Mar 20, 2024 · 5 comments
Open

Match max label length with solr search input #442

mkrzmr opened this issue Mar 20, 2024 · 5 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mkrzmr
Copy link
Contributor

mkrzmr commented Mar 20, 2024

It is possible to create an item with a long label like this one here:
{stage } publication/u2C8pK

You can access that item via the ID, but any item-search request will fail:

{stage}search?q=The+journal+_al-Muqtabas_+between+_Shamela.ws_%2C+HathiTrust%2C+and+GitHub+-+producing+open%2C+collaborative%2C+and+fully-referencable+digital+editions+of+early+Arabic+periodicals+-+with+almost+no+funds

response:

{"timestamp":"2024-03-20 07:54:54","status":500,"error":"Error from server at http://api-prod-sshomp-solr:8983/solr: Expected mime type application/octet-stream but got text/html. <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>; nested exception is org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://api-prod-sshomp-solr:8983/solr: Expected mime type application/octet-stream but got text/html. <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>"}

to do: Either reduce max length for label or increase max input for solr

@mkrzmr mkrzmr added the bug Something isn't working label Mar 20, 2024
@mkrzmr mkrzmr added this to the Q1 2024 milestone Mar 20, 2024
@KlausIllmayer
Copy link
Contributor

We once had this problem with media urls, see #20 - this was solved, maybe helpful?

Seems that this is now an issue on side of Solr. Just an info to @tparkola: I still didn't update to the newer Solr version (see #436) could this be helpful or is this something to be done in the code?

@tparkola
Copy link
Contributor

I think a quick solution would be to increase allowed maximum header size in solr/jetty docker config, i.e.
-Dsolr.jetty.request.header.size=65535
Apart from that we can add an issue to the backend to to change the method that backend uses to communicate with solr (from GET to POST). But I would wait with investigating this for our solr version is to be updated (relevant pull request is merged).
Let me know if you managed to reconfigure docker deployment successfully and the issue is solved.

@laureD19 laureD19 assigned KlausIllmayer and unassigned tparkola Jun 6, 2024
@mkrzmr
Copy link
Contributor Author

mkrzmr commented Oct 4, 2024

this issue still exists, see {stage}/publication/Rirecm

@laureD19 laureD19 modified the milestones: Q1 2024, Q4 2024 Oct 4, 2024
@vronk vronk assigned tparkola and unassigned KlausIllmayer Oct 4, 2024
@vronk
Copy link
Contributor

vronk commented Oct 4, 2024

@tparkola could you look into this?
It seems the easiest to restrict the size of title, but maybe you have different suggestion?

@tparkola
Copy link
Contributor

tparkola commented Oct 4, 2024

The question is whether you tried to change the config to allow larger header size as I mentioned in my previous comment? It should be provided via SOLR_OPTS variable to the docker of solr. I think it should solve this issue. Please check and let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants