We did that. Like get the data in the document and then index it in solr. But the approach I was looking is for large data, because the api I will be finally using will fetch a lot of data, it would not be possible to put that data in document and then index it.
On 2021/07/07 13:43:14, Christopher Schultz <ch...@christopherschultz.net> wrote: > Janvi, > > On 7/7/21 01:16, Janvi T wrote: > > On 2021/07/07 04:37:28, Gora Mohanty <g...@mimirtech.com> wrote: > >> On Wed, 7 Jul 2021 at 00:18, Janvi T <janvit...@gmail.com> wrote: > >> > >>> Hi everyone, > >>> I wanted to know if we can fetch data from REST API can index the data in > >>> solr. And if yes then how? > >>> > >>> I have an API that returns data in JSON format and I want to index that > >>> data into solr. I read about Data import handler and how to use > >>> URLDataSource but it does not seem to work with JSON data. > >>> > >> > >> Please take a look at > >> https://solr.apache.org/guide/6_6/uploading-data-with-index-handlers.html > >> which has information on indexing from various formats. including JSON. > > > > 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. > > Can you not write a small program to query your API and send the data as > documents into Solr? You could even write it in Javscript and run it > directly in a web browser. > > -chris >