Thanks for your help. I think this can help us. I will try this and see if it works.
Thanks and regards, Janvi Talreja On 2021/07/07 08:29:20, Gora Mohanty <g...@mimirtech.com> wrote: > On Wed, 7 Jul 2021 at 12:51, Janvi T <janvit...@gmail.com> wrote: > > > Hi, thanks for sharing but I am trying to get the JSON data from an API. I > > have a REST API that returns JSON data and I want to use that URL to get > > the data and then index it. > > > > Sorry, somehow missed that bit. > * You can write a short script (even a shell script should do) to fetch the > JSON from the API, and POST it to Solr’s /update handler as described in > the link i my earlier message > > DataImportHandler with URLDataSource as you seem to have tried, expects > XML, and uses XMLEntityProcessor to parse the data. It cannot handle JSON, > but it seems that someone has written a SimpleJSONEntityProcessor for > URLDataSource which might meet your needs: > https://github.com/qcoh/SimpleJSONEntityProcessor . Have not used it myself. > > Regards, > Gora >