ashish.g
ashish.g

Reputation: 588

How to insert data to solr collection using Postman?

Hi I have json data which i want to insert into solr. How can i do that using Postman. I need send a json data and store it into solr core. How can i do that using POSTMAN

   {
   "name":"John",
    "age":30,
    "cars":"BMW"
     },
    {
     "name":"Harry",
     "age":30,
     "cars":"BMW"
       },
      {
      "name":"Pinku",
      "age":30,
      "cars":"BMW"
      }

Upvotes: 0

Views: 2806

Answers (1)

pwaterz
pwaterz

Reputation: 731

  1. POST request to http://localhost:8983/solr/[collection_name]/update?commitWithin=1000
  2. Add the header Content-Type: application/json
  3. Make sure to create a json array for multiple documents

    [ { "name": "John", "age": 30, "cars": "BMW" }, { "name": "Harry", "age": 30, "cars": "BMW" }, { "name": "Pinku", "age": 30, "cars": "BMW" } ]

Upvotes: 2

Related Questions