简体   繁体   English

Solr:指向包含JSON文件的目录以建立索引

[英]Solr: Point a directory with JSON files to index

I just started to play around with solr. 我刚刚开始玩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. 我按照本教程中的说明设置了solr,并阅读了有关为json编制索引说明,但这些说明都没有清楚地告诉我如何将solr指向具有json文件集的目录。

Here is the scenario: 这是场景:

I have a directory with avro files that I have converted into JSON in a directory. 我有一个包含avro文件的目录,该文件已在目录中转换为JSON。 These json files actually reflect an inverted index. 这些json文件实际上反映了一个反向索引。 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? 我将其作为原型建筑(概念验证)来完成,实现此目的的最佳方法是什么?

Solr would not look up the directory. Solr不会查找目录。
You would need to have a job to scan the directory and feed the data to Solr. 您将需要工作来扫描目录并将数据提供给Solr。
Solr does provide an interface to be fed with JSON data so you can feed the data directly through Client interface. Solr确实提供了一个供JSON数据馈送的接口,因此您可以直接通过Client接口馈送数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM