solr-node
solr-node copied to clipboard
Provide option for specifying request method
When calling the client's search
method a GET
request is made. However, under certain circumstances POST
request is required, e.g. when the request URI gets to long, solr will return error 414: URI too long
. This can be avoided by sending the parameters in the body of a POT
request.
The modified interface could look like this:
solrClient.search(strQuery, { method: 'POST' }, function (err, result) {
if (err) {
console.log(err);
return;
}
console.log('Response:', result.response);
});
Hi
let me try to clarify : what you mean is that you would like to have a GET Request with a JSON BODY as described here : https://lucene.apache.org/solr/guide/8_1/json-request-api.html
Is this correct ? I am not sure { method: 'POST' } is appropriate as this is still a GET. { parameters: 'URL' } or { parameters: 'JSON' }... ??
@bejohu @godong9 : opinion?