Re: CURL command problem on Solr
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Roee, On 5/30/18 3:38 AM, Roee T wrote: > Thank you so much all of you the following worked for me! > > curl -X PUT -H "Content-Type: application/json" -d > "@Myfeatures.json" > "http://localhost:8983/solr/techproducts/schema/feature-store; Curl assumes that the URL is the last argument to the program, so it stops reading options (left-to-right) when it gets to the URL. So if you put options after the URL they will be ignored. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlsOzDIACgkQHPApP6U8 pFjHjhAAjwI0xMzqK1Pzhogiumq6XVNLr8BqqlL2jMMXcf3EcwOx5WT62oqDFs92 JILArQSPp22GUOvR3cTxlmTVAYsjvMqsvkbVugxeU5VtBBz1VVwy3bU220nKlooo El9T0292wbuP/QbUGdt0qfnpMkXIfbdwKJhd7MQ30J8S7XxvQx8j5YQhe2MAkPlz x7Bc4Qy2J6ov5wNq2sd4wuj5XvvjDE+8pFDXWtC6m7mfjsbGrHTAIoTI843GAVRz RkMd08vzsmoS81cNsaQAqxJCX0tP2Hwbx0asH94ZO0ohlHe8dB5hmk1fS0TDgNae QR4hczJ3lYQCpvZXYFCUihC/7Sfpe3/yjs/Ke2DlbUtXJHaLulSYoo7RrgTl3JZy zBne6HNtcruvQAqDIjKq8xcAzszLsxVPA4RGqO/J5uY96hyuUe/NuJUeUdRTkIbU wC+DYs8ch7PeOMGkW1MYWSeakPRdQ1/5EKS1mtubJNBVOCri+hy4I+KT5V1f9y8x 8GIySXaoH52xt3b/hsJajQ2PdHd4KRGgB1H7mx9ntXsoVzmPSanuxQ6w+E/XUHDt iyl2WheLtUop+ukE7ahGUe+IPEVqTMXtdiQBCDB0IWyGbsB00M5P9ZUeFbOCCfle B0N3Jafv7hGjLHzfjpu3lAUneS3ct2Ljy4Za2snW/ZgMzezHUUY= =xZzo -END PGP SIGNATURE-
Re: CURL command problem on Solr
Thank you so much all of you the following worked for me! curl -X PUT -H "Content-Type: application/json" -d "@Myfeatures.json" "http://localhost:8983/solr/techproducts/schema/feature-store; -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: CURL command problem on Solr
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Roee, On 5/29/18 11:02 AM, Roee Tarab wrote: > I am having some troubles with pushing a features file to solr > while building an LTR model. I'm trying to upload a JSON file on > windows cmd executable from an already installed CURL folder, with > the command: > > curl -XPUT > 'http://localhost:8983/solr/techproducts/schema/feature-store' > --data-binary "@/path/myFeatures.json" -H > 'Content-type:application/json'. > > I am receiving the following error massage: > > { "responseHeader":{ "status":500, "QTime":7}, "error":{ "msg":"Bad > Request", "trace":"Bad Request (400) - Invalid content type > application/x-www-form-urlencoded; only application/json is > supported.\r\n\tat > org.apache.solr.rest.RestManager$ManagedEndpoint. > parseJsonFromRequestBody(RestManager.java:407)\r\n\tat > org.apache.solr.rest. > RestManager$ManagedEndpoint.put(RestManager.java:340) > > This is definitely a technical issue, and I have not been able to > overcome it for 2 days. > > Is there another option of uploading the file to our core? Is > there something we are missing in our command? What happens if you put the URL as the very last command-line option, instead of the second one? - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlsNpFMACgkQHPApP6U8 pFjCxQ//WvN5ISrSf1Hoek+HA9e/1jgvHdtbPTz3SKx9Cxv0M28VDE41dOD8/TJU Yeu8WIIyjbAOugPxYd6X/1Q+ksmzp8DwcANO4uWjM7m9KnrKUcgUqFbiEx5DCWFv cCO49lD6pbnP7M21BFqIUPdRu4Sk84bObhb8+pFiANDurGG9iDGsk4z5JG8kph1n QtJeyGss79GF4Fb8Ojs+rju+fcMW9tssi2NCbPI/OUmcEntonmVQKW6Zg8WaqlXD w29gjss9P6sMloyIe4QbusxfwCL//HdCjuTBOAOZg/Od+Xb4bHG3AkZGqjmf21qC oR7hjwkQtjl9C9yK5pHMPvAK1bUR8NCuv993dCOw3ddwdPsScv7K7TsI7GqVOfCD X+PwkrE1PeZbPfSJGO4jVEwRIZ1zx5jRwl2WFpa0HSTnN2+GHVZnezqqIOW6HVax Hb/7r13vs+6jOUBQPZvzcWtnGl7DurAwYM3nREgBjzMeXYMKqI67lwSBieoyC/da a8GxkZBn6J+vutLI/hodi8ymUB+wNxiV6W4XTG8t2HSLGmZWD9fUgW6gr4a8WRQk LM8yzmVSADjTkf5/fdKZ9ausYoMwHzrxKc0ceuK1iEF9WNts6AdOoIcIxrrFfr0v yPyXnVaGS/5eLnwEt3vR8DROZRpX6OUKgteZRln0QQpAWegzW/I= =U23/ -END PGP SIGNATURE-
Re: CURL command problem on Solr
HTTP headers are case insensitive Original message From: simon Date: 5/29/18 12:17 PM (GMT-05:00) To: solr-user Subject: Re: CURL command problem on Solr Could it be that the header should be 'Content-Type' (which is what I see in the relevant RFC) rather than 'Content-type' as shown in your email ? I don't know if headers are case-sensitive, but it's worth checking. -Simon On Tue, May 29, 2018 at 11:02 AM, Roee Tarab wrote: > Hi , > > I am having some troubles with pushing a features file to solr while > building an LTR model. I'm trying to upload a JSON file on windows cmd > executable from an already installed CURL folder, with the command: > > curl -XPUT 'http://localhost:8983/solr/techproducts/schema/feature-store' > --data-binary "@/path/myFeatures.json" -H 'Content-type:application/json'. > > I am receiving the following error massage: > > { > "responseHeader":{ > "status":500, > "QTime":7}, > "error":{ > "msg":"Bad Request", > "trace":"Bad Request (400) - Invalid content type > application/x-www-form-urlencoded; only application/json is > supported.\r\n\tat org.apache.solr.rest.RestManager$ManagedEndpoint. > parseJsonFromRequestBody(RestManager.java:407)\r\n\tat > org.apache.solr.rest. > RestManager$ManagedEndpoint.put(RestManager.java:340) > > This is definitely a technical issue, and I have not been able to overcome > it for 2 days. > > Is there another option of uploading the file to our core? Is there > something we are missing in our command? > > Thank you in advance for any help, >
Re: CURL command problem on Solr
Could it be that the header should be 'Content-Type' (which is what I see in the relevant RFC) rather than 'Content-type' as shown in your email ? I don't know if headers are case-sensitive, but it's worth checking. -Simon On Tue, May 29, 2018 at 11:02 AM, Roee Tarab wrote: > Hi , > > I am having some troubles with pushing a features file to solr while > building an LTR model. I'm trying to upload a JSON file on windows cmd > executable from an already installed CURL folder, with the command: > > curl -XPUT 'http://localhost:8983/solr/techproducts/schema/feature-store' > --data-binary "@/path/myFeatures.json" -H 'Content-type:application/json'. > > I am receiving the following error massage: > > { > "responseHeader":{ > "status":500, > "QTime":7}, > "error":{ > "msg":"Bad Request", > "trace":"Bad Request (400) - Invalid content type > application/x-www-form-urlencoded; only application/json is > supported.\r\n\tat org.apache.solr.rest.RestManager$ManagedEndpoint. > parseJsonFromRequestBody(RestManager.java:407)\r\n\tat > org.apache.solr.rest. > RestManager$ManagedEndpoint.put(RestManager.java:340) > > This is definitely a technical issue, and I have not been able to overcome > it for 2 days. > > Is there another option of uploading the file to our core? Is there > something we are missing in our command? > > Thank you in advance for any help, >
CURL command problem on Solr
Hi , I am having some troubles with pushing a features file to solr while building an LTR model. I'm trying to upload a JSON file on windows cmd executable from an already installed CURL folder, with the command: curl -XPUT 'http://localhost:8983/solr/techproducts/schema/feature-store' --data-binary "@/path/myFeatures.json" -H 'Content-type:application/json'. I am receiving the following error massage: { "responseHeader":{ "status":500, "QTime":7}, "error":{ "msg":"Bad Request", "trace":"Bad Request (400) - Invalid content type application/x-www-form-urlencoded; only application/json is supported.\r\n\tat org.apache.solr.rest.RestManager$ManagedEndpoint. parseJsonFromRequestBody(RestManager.java:407)\r\n\tat org.apache.solr.rest. RestManager$ManagedEndpoint.put(RestManager.java:340) This is definitely a technical issue, and I have not been able to overcome it for 2 days. Is there another option of uploading the file to our core? Is there something we are missing in our command? Thank you in advance for any help,