on 04-14-2017 2:03 PM
Hi we're getting Solr server error
non ok status: 414, message:Request-URI Too Long
with phrases long 10-20 chars in the auto-suggest search box. Is this supposed to happen? Hybris 6.1.0.2
Caused by: de.hybris.platform.solrfacetsearch.search.FacetSearchException: Error from server at http://localhost:8983/solr/master_mw_Product: non ok status: 414, message:Request-URI Too Long
at de.hybris.platform.solrfacetsearch.search.impl.LegacyFacetSearchStrategy.search(LegacyFacetSearchStrategy.java:170) ~[solrfacetsearchserver.jar:?]
... 135 more
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/master_mw_Product: non ok status: 414, message:Request-URI Too Long
at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:493) ~[solr-solrj-5.3.0.jar:5.3.0 1696229 - noble - 2015-08-17 17:10:45]
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:234) ~[solr-solrj-5.3.0.jar:5.3.0 1696229 - noble - 2015-08-17 17:10:45]
at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:226) ~[solr-solrj-5.3.0.jar:5.3.0 1696229 - noble - 2015-08-17 17:10:45]
at org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(LBHttpSolrClient.java:526) ~[solr-solrj-5.3.0.jar:5.3.0 1696229 - noble - 2015-08-17 17:10:45]
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135) ~[solr-solrj-5.3.0.jar:5.3.0 1696229 - noble - 2015-08-17 17:10:45]
at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:943) ~[solr-solrj-5.3.0.jar:5.3.0 1696229 - noble - 2015-08-17 17:10:45]
at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:958) ~[solr-solrj-5.3.0.jar:5.3.0 1696229 - noble - 2015-08-17 17:10:45]
at de.hybris.platform.solrfacetsearch.search.impl.LegacyFacetSearchStrategy.queryInternal(LegacyFacetSearchStrategy.java:208) ~[solrfacetsearchserver.jar:?]
at de.hybris.platform.solrfacetsearch.search.impl.LegacyFacetSearchStrategy.search(LegacyFacetSearchStrategy.java:164) ~[solrfacetsearchserver.jar:?]
... 135 more
thanks nicola
[1]: /storage/temp/8379-immagine-9.png
You can override the facet search strategy and change the method from GET to POST:
final QueryResponse queryResponse = solrClient.query(solrQuery, METHOD.POST);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can to do that in Solr Config (Hybris 6.4):
INSERT_UPDATE SolrServerConfig ; name[unique=true] ; mode(code) ; solrQueryMethod(code) ; $serverConfigName ; standalone ; POST
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you're using backoffice you can set it to POST it by changing Solr Query Method property as depicted in the attached screenshot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Option B) is to increase the request header size for jetty then you can still stick to the GET calls without any code changes.
/ext-commerce/solrserver/resources/solr/server/etc/jetty.xml
<Set name="requestHeaderSize"><Property name="solr.jetty.request.header.size" default="8192" /></Set>
Setting this to "65536" should also solve your problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi , easiest way would be to patch this file "ant customize". To do this create the folder stucture "/ext-commerce/solrserver/resources/solr/server/etc/" in your config/customize folder and place the updated jetty.xml inside the created folder. When you then run ant customize the file will be updated.
On your production environments you'll have to manually update this jetty.xml as the solr servers will most likely be on different machines.
Keep in mind that after a hybris upgrade you need to check the patched files and perform "ant customize again"
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.