Solr: Point a directory with JSON files to index

627 views Asked by At

I just started to play around with solr. I followed the instructions in the tutorial to setup solr and read the instructions on indexing json but non of these instructions clearly tell me how I can point solr to index a directory that has set of json files.

Here is the scenario:

I have a directory with avro files that I have converted into JSON in a directory. These json files actually reflect an inverted index. Here is an example:

{"key":"Abspielbare Disc-Formate=DVD-RW CD-RW DVD CD-R DVD-R Blu-ray DVD+R Blu-ray 3D DVD+RW","bucket":0,"itemIds":[200954633626,261238075742,300941653731,200950705778,281149811840,300938796714,321171970722,200954527166,190884779162,200954942602]}
{"key":"Accesorios=BaterĂ­a Carcasa Cargador coche Funda","bucket":0,"itemIds":[111141087676]}

I am doing this as a prototype building (proof of concept), What is the best way to accomplish this?

1

There are 1 answers

0
Jayendra On

Solr would not look up the directory.
You would need to have a job to scan the directory and feed the data to Solr.
Solr does provide an interface to be fed with JSON data so you can feed the data directly through Client interface.