NCEAS / metacat

Data repository software that helps researchers preserve, share, and discover data
https://knb.ecoinformatics.org/software/metacat
GNU General Public License v2.0
25 stars 12 forks source link

Long Post Query doesn't work with the external HTTP Solr server #1419

Closed taojing2002 closed 4 years ago

taojing2002 commented 4 years ago

When we use the post query to pass a long query to Metacat, Metacat will relay the query to Solr. It works well when we used the embedded Solr server. However, it doesn't work after the external Solr server was introduced. We got this error:

Solr server error: Error from server at http://localhost:8983/solr/metacat-index: Expected mime type application/octet-stream but got text/html. <h1>Bad Message 414</h1><pre>reason: URI Too Long</pre>

It seems the query is sent by the HTTP GET method to the Solr server. We need to use the POST method as well.

taojing2002 commented 4 years ago

We specify the POST method when we use the mn post query to query solr. https://github.com/NCEAS/metacat/commit/57e11f0eec0a1241ba72ceaf0cb856e668aa506c