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