I think what you're asking is: can Solr connect to an external REST API,
pull down data in JSON format and then index that data. No, I don't
think there's anything in Solr that can do that: the (deprecated)
DataImportHandler can connect to databases and run SQL statements to
collect data, but that's about it.
Your best approach would be to script something to carry out indexing in
this way, using Python or another language - an 'indexer' program. There
are plenty of online examples of Solr indexers.
Cheers
Charlie
On 07/07/2021 06:16, Janvi T 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.
Thanks.
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.
Regards,
Gora
--
Charlie Hull - Managing Consultant at OpenSource Connections Limited
<www.o19s.com>
Founding member of The Search Network <https://thesearchnetwork.com/>
and co-author of Searching the Enterprise
<https://opensourceconnections.com/about-us/books-resources/>
tel/fax: +44 (0)8700 118334
mobile: +44 (0)7767 825828